

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="Description" content="scikit-learn: machine learning in Python">

  
  <title>Examples &mdash; scikit-learn 0.22 documentation</title>
  
  <link rel="canonical" href="http://scikit-learn.org/stable/auto_examples/index.html" />

  
  <link rel="shortcut icon" href="../_static/favicon.ico"/>
  

  <link rel="stylesheet" href="../_static/css/vendor/bootstrap.min.css" type="text/css" />
  <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script> 
</head>
<body>
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0">
  <div class="container-fluid sk-docs-container px-0">
      <a class="navbar-brand py-0" href="../index.html">
        <img
          class="sk-brand-img"
          src="../_static/scikit-learn-logo-small.png"
          alt="logo"/>
      </a>
    <button
      id="sk-navbar-toggler"
      class="navbar-toggler"
      type="button"
      data-toggle="collapse"
      data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent"
      aria-expanded="false"
      aria-label="Toggle navigation"
    >
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../install.html">Install</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../user_guide.html">User Guide</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="../modules/classes.html">API</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link" href="#">Examples</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../getting_started.html">Getting Started</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../tutorial/index.html">Tutorial</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../glossary.html">Glossary</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../developers/index.html">Development</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../faq.html">FAQ</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../related_projects.html">Related packages</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../roadmap.html">Roadmap</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../about.html">About us</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
        </li>
        <li class="nav-item">
          <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
        </li>
        <li class="nav-item dropdown nav-more-item-dropdown">
          <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="sk-nav-dropdown-item dropdown-item" href="../getting_started.html">Getting Started</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../tutorial/index.html">Tutorial</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../glossary.html">Glossary</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../developers/index.html">Development</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../faq.html">FAQ</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../related_projects.html">Related packages</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../roadmap.html">Roadmap</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="../about.html">About us</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-learn/scikit-learn">GitHub</a>
              <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-learn.org/dev/versions.html">Other Versions</a>
          </div>
        </li>
      </ul>
      <div id="searchbox" role="search">
          <div class="searchformwrapper">
          <form class="search" action="../search.html" method="get">
            <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" />
            <input class="sk-search-text-btn" type="submit" value="Go" />
          </form>
          </div>
      </div>
    </div>
  </div>
</nav>
<div class="d-flex" id="sk-doc-wrapper">
    <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox">
    <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label>
    <div id="sk-sidebar-wrapper" class="border-right">
      <div class="sk-sidebar-toc-wrapper">
        <div class="sk-sidebar-toc-logo">
          <a href="../index.html">
            <img
              class="sk-brand-img"
              src="../_static/scikit-learn-logo-small.png"
              alt="logo"/>
          </a>
        </div>
        <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks">
            <a href="../glossary.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Glossary of Common Terms and API Elements">Prev</a>
            <a href="#" role="button" class="btn sk-btn-rellink disabled py-1">Up</a>
            <a href="plot_changed_only_pprint_parameter.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Compact estimator representations">Next</a>
        </div>
        <div class="alert alert-danger p-1 mb-2" role="alert">
          <p class="text-center mb-0">
          <strong>scikit-learn 0.22</strong><br/>
          <a href="http://scikit-learn.org/dev/versions.html">Other versions</a>
          </p>
        </div>
        <div class="alert alert-warning p-1 mb-2" role="alert">
          <p class="text-center mb-0">
            Please <a class="font-weight-bold" href="../about.html#citing-scikit-learn"><string>cite us</string></a> if you use the software.
          </p>
        </div>
          <div class="sk-sidebar-toc">
            <ul>
<li><a class="reference internal" href="#">Examples</a><ul>
<li><a class="reference internal" href="#miscellaneous-examples">Miscellaneous examples</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#biclustering">Biclustering</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#calibration">Calibration</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#classification">Classification</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#clustering">Clustering</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#covariance-estimation">Covariance estimation</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#cross-decomposition">Cross decomposition</a></li>
<li><a class="reference internal" href="#dataset-examples">Dataset examples</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#decision-trees">Decision Trees</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#decomposition">Decomposition</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#ensemble-methods">Ensemble methods</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#examples-based-on-real-world-datasets">Examples based on real world datasets</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#feature-selection">Feature Selection</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#gaussian-mixture-models">Gaussian Mixture Models</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#gaussian-process-for-machine-learning">Gaussian Process for Machine Learning</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#generalized-linear-models">Generalized Linear Models</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#inspection">Inspection</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#manifold-learning">Manifold learning</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#missing-value-imputation">Missing Value Imputation</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#model-selection">Model Selection</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#multioutput-methods">Multioutput methods</a></li>
<li><a class="reference internal" href="#nearest-neighbors">Nearest Neighbors</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#neural-networks">Neural Networks</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#pipelines-and-composite-estimators">Pipelines and composite estimators</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#preprocessing">Preprocessing</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#release-highlights">Release Highlights</a></li>
<li><a class="reference internal" href="#semi-supervised-classification">Semi Supervised Classification</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#support-vector-machines">Support Vector Machines</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#tutorial-exercises">Tutorial exercises</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#working-with-text-documents">Working with text documents</a><ul>
</ul>
</li>
</ul>
</li>
</ul>

          </div>
      </div>
    </div>
    <div id="sk-page-content-wrapper">
      <div class="sk-page-content container-fluid body px-md-3" role="main">
        
  <div class="section" id="examples">
<span id="general-examples"></span><span id="sphx-glr-auto-examples"></span><h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h1>
<div class="section" id="miscellaneous-examples">
<h2>Miscellaneous examples<a class="headerlink" href="#miscellaneous-examples" title="Permalink to this headline">¶</a></h2>
<p>Miscellaneous and introductory examples for scikit-learn.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of the print_changed_only global parameter."><div class="figure align-default" id="id2">
<img alt="../_images/sphx_glr_plot_changed_only_pprint_parameter_thumb.png" src="../_images/sphx_glr_plot_changed_only_pprint_parameter_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_changed_only_pprint_parameter.html#sphx-glr-auto-examples-plot-changed-only-pprint-parameter-py"><span class="std std-ref">Compact estimator representations</span></a></span><a class="headerlink" href="#id2" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="ROC Curve with Visualization API"><div class="figure align-default" id="id3">
<img alt="../_images/sphx_glr_plot_roc_curve_visualization_api_thumb.png" src="../_images/sphx_glr_plot_roc_curve_visualization_api_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_roc_curve_visualization_api.html#sphx-glr-auto-examples-plot-roc-curve-visualization-api-py"><span class="std std-ref">ROC Curve with Visualization API</span></a></span><a class="headerlink" href="#id3" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of the isotonic regression on generated data. The isotonic regression finds a n..."><div class="figure align-default" id="id4">
<img alt="../_images/sphx_glr_plot_isotonic_regression_thumb.png" src="../_images/sphx_glr_plot_isotonic_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_isotonic_regression.html#sphx-glr-auto-examples-plot-isotonic-regression-py"><span class="std std-ref">Isotonic Regression</span></a></span><a class="headerlink" href="#id4" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="    See also sphx_glr_auto_examples_plot_roc_curve_visualization_api.py"><div class="figure align-default" id="id5">
<img alt="../_images/sphx_glr_plot_partial_dependence_visualization_api_thumb.png" src="../_images/sphx_glr_plot_partial_dependence_visualization_api_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_partial_dependence_visualization_api.html#sphx-glr-auto-examples-plot-partial-dependence-visualization-api-py"><span class="std std-ref">Advanced Plotting With Partial Dependence</span></a></span><a class="headerlink" href="#id5" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of multi-output estimator to complete images. The goal is to predict..."><div class="figure align-default" id="id6">
<img alt="../_images/sphx_glr_plot_multioutput_face_completion_thumb.png" src="../_images/sphx_glr_plot_multioutput_face_completion_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_multioutput_face_completion.html#sphx-glr-auto-examples-plot-multioutput-face-completion-py"><span class="std std-ref">Face completion with a multi-output estimators</span></a></span><a class="headerlink" href="#id6" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example simulates a multi-label document classification problem. The dataset is generated ..."><div class="figure align-default" id="id7">
<img alt="../_images/sphx_glr_plot_multilabel_thumb.png" src="../_images/sphx_glr_plot_multilabel_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_multilabel.html#sphx-glr-auto-examples-plot-multilabel-py"><span class="std std-ref">Multilabel classification</span></a></span><a class="headerlink" href="#id7" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different anomaly detection algorithms on 2D datasets. Da..."><div class="figure align-default" id="id8">
<img alt="../_images/sphx_glr_plot_anomaly_comparison_thumb.png" src="../_images/sphx_glr_plot_anomaly_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_anomaly_comparison.html#sphx-glr-auto-examples-plot-anomaly-comparison-py"><span class="std std-ref">Comparing anomaly detection algorithms for outlier detection on toy datasets</span></a></span><a class="headerlink" href="#id8" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip=" The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly pr..."><div class="figure align-default" id="id9">
<img alt="../_images/sphx_glr_plot_johnson_lindenstrauss_bound_thumb.png" src="../_images/sphx_glr_plot_johnson_lindenstrauss_bound_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_johnson_lindenstrauss_bound.html#sphx-glr-auto-examples-plot-johnson-lindenstrauss-bound-py"><span class="std std-ref">The Johnson-Lindenstrauss bound for embedding with random projections</span></a></span><a class="headerlink" href="#id9" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Both kernel ridge regression (KRR) and SVR learn a non-linear function by employing the kernel ..."><div class="figure align-default" id="id10">
<img alt="../_images/sphx_glr_plot_kernel_ridge_regression_thumb.png" src="../_images/sphx_glr_plot_kernel_ridge_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_kernel_ridge_regression.html#sphx-glr-auto-examples-plot-kernel-ridge-regression-py"><span class="std std-ref">Comparison of kernel ridge regression and SVR</span></a></span><a class="headerlink" href="#id10" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example illustrating the approximation of the feature map of an RBF kernel."><div class="figure align-default" id="id11">
<img alt="../_images/sphx_glr_plot_kernel_approximation_thumb.png" src="../_images/sphx_glr_plot_kernel_approximation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_kernel_approximation.html#sphx-glr-auto-examples-plot-kernel-approximation-py"><span class="std std-ref">Explicit feature map approximation for RBF kernels</span></a></span><a class="headerlink" href="#id11" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="biclustering">
<span id="bicluster-examples"></span><span id="sphx-glr-auto-examples-bicluster"></span><h2>Biclustering<a class="headerlink" href="#biclustering" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster.bicluster</span></code> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to generate a dataset and bicluster it using the Spectral Co-Clus..."><div class="figure align-default" id="id12">
<img alt="../_images/sphx_glr_plot_spectral_coclustering_thumb.png" src="../_images/sphx_glr_plot_spectral_coclustering_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="bicluster/plot_spectral_coclustering.html#sphx-glr-auto-examples-bicluster-plot-spectral-coclustering-py"><span class="std std-ref">A demo of the Spectral Co-Clustering algorithm</span></a></span><a class="headerlink" href="#id12" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to generate a checkerboard dataset and bicluster it using the Spe..."><div class="figure align-default" id="id13">
<img alt="../_images/sphx_glr_plot_spectral_biclustering_thumb.png" src="../_images/sphx_glr_plot_spectral_biclustering_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="bicluster/plot_spectral_biclustering.html#sphx-glr-auto-examples-bicluster-plot-spectral-biclustering-py"><span class="std std-ref">A demo of the Spectral Biclustering algorithm</span></a></span><a class="headerlink" href="#id13" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the Spectral Co-clustering algorithm on the twenty newsgroups dataset..."><div class="figure align-default" id="id14">
<img alt="../_images/sphx_glr_plot_bicluster_newsgroups_thumb.png" src="../_images/sphx_glr_plot_bicluster_newsgroups_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="bicluster/plot_bicluster_newsgroups.html#sphx-glr-auto-examples-bicluster-plot-bicluster-newsgroups-py"><span class="std std-ref">Biclustering documents with the Spectral Co-clustering algorithm</span></a></span><a class="headerlink" href="#id14" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="calibration">
<span id="calibration-examples"></span><span id="sphx-glr-auto-examples-calibration"></span><h2>Calibration<a class="headerlink" href="#calibration" title="Permalink to this headline">¶</a></h2>
<p>Examples illustrating the calibration of predicted probabilities of classifiers.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Well calibrated classifiers are probabilistic classifiers for which the output of the predict_p..."><div class="figure align-default" id="id15">
<img alt="../_images/sphx_glr_plot_compare_calibration_thumb.png" src="../_images/sphx_glr_plot_compare_calibration_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="calibration/plot_compare_calibration.html#sphx-glr-auto-examples-calibration-plot-compare-calibration-py"><span class="std std-ref">Comparison of Calibration of Classifiers</span></a></span><a class="headerlink" href="#id15" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="When performing classification one often wants to predict not only the class label, but also th..."><div class="figure align-default" id="id16">
<img alt="../_images/sphx_glr_plot_calibration_curve_thumb.png" src="../_images/sphx_glr_plot_calibration_curve_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py"><span class="std std-ref">Probability Calibration curves</span></a></span><a class="headerlink" href="#id16" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="When performing classification you often want to predict not only the class label, but also the..."><div class="figure align-default" id="id17">
<img alt="../_images/sphx_glr_plot_calibration_thumb.png" src="../_images/sphx_glr_plot_calibration_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="calibration/plot_calibration.html#sphx-glr-auto-examples-calibration-plot-calibration-py"><span class="std std-ref">Probability calibration of classifiers</span></a></span><a class="headerlink" href="#id17" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how sigmoid calibration changes predicted probabilities for a 3-class ..."><div class="figure align-default" id="id18">
<img alt="../_images/sphx_glr_plot_calibration_multiclass_thumb.png" src="../_images/sphx_glr_plot_calibration_multiclass_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="calibration/plot_calibration_multiclass.html#sphx-glr-auto-examples-calibration-plot-calibration-multiclass-py"><span class="std std-ref">Probability Calibration for 3-class classification</span></a></span><a class="headerlink" href="#id18" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="classification">
<span id="classification-examples"></span><span id="sphx-glr-auto-examples-classification"></span><h2>Classification<a class="headerlink" href="#classification" title="Permalink to this headline">¶</a></h2>
<p>General examples about classification algorithms.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Shows how shrinkage improves classification. "><div class="figure align-default" id="id19">
<img alt="../_images/sphx_glr_plot_lda_thumb.png" src="../_images/sphx_glr_plot_lda_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="classification/plot_lda.html#sphx-glr-auto-examples-classification-plot-lda-py"><span class="std std-ref">Normal and Shrinkage Linear Discriminant Analysis for classification</span></a></span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example showing how the scikit-learn can be used to recognize images of hand-written digits."><div class="figure align-default" id="id20">
<img alt="../_images/sphx_glr_plot_digits_classification_thumb.png" src="../_images/sphx_glr_plot_digits_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="classification/plot_digits_classification.html#sphx-glr-auto-examples-classification-plot-digits-classification-py"><span class="std std-ref">Recognizing hand-written digits</span></a></span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the classification probability for different classifiers. We use a 3 class dataset, and we..."><div class="figure align-default" id="id21">
<img alt="../_images/sphx_glr_plot_classification_probability_thumb.png" src="../_images/sphx_glr_plot_classification_probability_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="classification/plot_classification_probability.html#sphx-glr-auto-examples-classification-plot-classification-probability-py"><span class="std std-ref">Plot classification probability</span></a></span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A comparison of a several classifiers in scikit-learn on synthetic datasets. The point of this ..."><div class="figure align-default" id="id22">
<img alt="../_images/sphx_glr_plot_classifier_comparison_thumb.png" src="../_images/sphx_glr_plot_classifier_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="classification/plot_classifier_comparison.html#sphx-glr-auto-examples-classification-plot-classifier-comparison-py"><span class="std std-ref">Classifier comparison</span></a></span><a class="headerlink" href="#id22" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example plots the covariance ellipsoids of each class and decision boundary learned by LDA..."><div class="figure align-default" id="id23">
<img alt="../_images/sphx_glr_plot_lda_qda_thumb.png" src="../_images/sphx_glr_plot_lda_qda_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="classification/plot_lda_qda.html#sphx-glr-auto-examples-classification-plot-lda-qda-py"><span class="std std-ref">Linear and Quadratic Discriminant Analysis with covariance ellipsoid</span></a></span><a class="headerlink" href="#id23" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="clustering">
<span id="cluster-examples"></span><span id="sphx-glr-auto-examples-cluster"></span><h2>Clustering<a class="headerlink" href="#clustering" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.cluster" title="sklearn.cluster"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cluster</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Plot Hierarchical Clustering Dendrogram"><div class="figure align-default" id="id24">
<img alt="../_images/sphx_glr_plot_agglomerative_dendrogram_thumb.png" src="../_images/sphx_glr_plot_agglomerative_dendrogram_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_agglomerative_dendrogram.html#sphx-glr-auto-examples-cluster-plot-agglomerative-dendrogram-py"><span class="std std-ref">Plot Hierarchical Clustering Dendrogram</span></a></span><a class="headerlink" href="#id24" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="These images how similar features are merged together using feature agglomeration. "><div class="figure align-default" id="id25">
<img alt="../_images/sphx_glr_plot_digits_agglomeration_thumb.png" src="../_images/sphx_glr_plot_digits_agglomeration_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_digits_agglomeration.html#sphx-glr-auto-examples-cluster-plot-digits-agglomeration-py"><span class="std std-ref">Feature agglomeration</span></a></span><a class="headerlink" href="#id25" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Reference:"><div class="figure align-default" id="id26">
<img alt="../_images/sphx_glr_plot_mean_shift_thumb.png" src="../_images/sphx_glr_plot_mean_shift_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_mean_shift.html#sphx-glr-auto-examples-cluster-plot-mean-shift-py"><span class="std std-ref">A demo of the mean-shift clustering algorithm</span></a></span><a class="headerlink" href="#id26" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example is meant to illustrate situations where k-means will produce unintuitive and possi..."><div class="figure align-default" id="id27">
<img alt="../_images/sphx_glr_plot_kmeans_assumptions_thumb.png" src="../_images/sphx_glr_plot_kmeans_assumptions_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_kmeans_assumptions.html#sphx-glr-auto-examples-cluster-plot-kmeans-assumptions-py"><span class="std std-ref">Demonstration of k-means assumptions</span></a></span><a class="headerlink" href="#id27" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example uses a large dataset of faces to learn a set of 20 x 20 images patches that consti..."><div class="figure align-default" id="id28">
<img alt="../_images/sphx_glr_plot_dict_face_patches_thumb.png" src="../_images/sphx_glr_plot_dict_face_patches_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_dict_face_patches.html#sphx-glr-auto-examples-cluster-plot-dict-face-patches-py"><span class="std std-ref">Online learning of a dictionary of parts of faces</span></a></span><a class="headerlink" href="#id28" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Face, a 1024 x 768 size image of a raccoon face, is used here to illustrate how k-means is used..."><div class="figure align-default" id="id29">
<img alt="../_images/sphx_glr_plot_face_compress_thumb.png" src="../_images/sphx_glr_plot_face_compress_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_face_compress.html#sphx-glr-auto-examples-cluster-plot-face-compress-py"><span class="std std-ref">Vector Quantization Example</span></a></span><a class="headerlink" href="#id29" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Reference: Brendan J. Frey and Delbert Dueck, &quot;Clustering by Passing Messages Between Data Poin..."><div class="figure align-default" id="id30">
<img alt="../_images/sphx_glr_plot_affinity_propagation_thumb.png" src="../_images/sphx_glr_plot_affinity_propagation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_affinity_propagation.html#sphx-glr-auto-examples-cluster-plot-affinity-propagation-py"><span class="std std-ref">Demo of affinity propagation clustering algorithm</span></a></span><a class="headerlink" href="#id30" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows the effect of imposing a connectivity graph to capture local structure in th..."><div class="figure align-default" id="id31">
<img alt="../_images/sphx_glr_plot_agglomerative_clustering_thumb.png" src="../_images/sphx_glr_plot_agglomerative_clustering_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_agglomerative_clustering.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-py"><span class="std std-ref">Agglomerative clustering with and without structure</span></a></span><a class="headerlink" href="#id31" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example uses spectral_clustering on a graph created from voxel-to-voxel difference on an i..."><div class="figure align-default" id="id32">
<img alt="../_images/sphx_glr_plot_coin_segmentation_thumb.png" src="../_images/sphx_glr_plot_coin_segmentation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_coin_segmentation.html#sphx-glr-auto-examples-cluster-plot-coin-segmentation-py"><span class="std std-ref">Segmenting the picture of greek coins in regions</span></a></span><a class="headerlink" href="#id32" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of various linkage option for agglomerative clustering on a 2D embedding of the..."><div class="figure align-default" id="id33">
<img alt="../_images/sphx_glr_plot_digits_linkage_thumb.png" src="../_images/sphx_glr_plot_digits_linkage_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_digits_linkage.html#sphx-glr-auto-examples-cluster-plot-digits-linkage-py"><span class="std std-ref">Various Agglomerative Clustering on a 2D embedding of digits</span></a></span><a class="headerlink" href="#id33" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The plots display firstly what a K-means algorithm would yield using three clusters. It is then..."><div class="figure align-default" id="id34">
<img alt="../_images/sphx_glr_plot_cluster_iris_thumb.png" src="../_images/sphx_glr_plot_cluster_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_cluster_iris.html#sphx-glr-auto-examples-cluster-plot-cluster-iris-py"><span class="std std-ref">K-means Clustering</span></a></span><a class="headerlink" href="#id34" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, an image with connected circles is generated and spectral clustering is used t..."><div class="figure align-default" id="id35">
<img alt="../_images/sphx_glr_plot_segmentation_toy_thumb.png" src="../_images/sphx_glr_plot_segmentation_toy_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_segmentation_toy.html#sphx-glr-auto-examples-cluster-plot-segmentation-toy-py"><span class="std std-ref">Spectral clustering for image segmentation</span></a></span><a class="headerlink" href="#id35" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Compute the segmentation of a 2D image with Ward hierarchical clustering. The clustering is spa..."><div class="figure align-default" id="id36">
<img alt="../_images/sphx_glr_plot_coin_ward_segmentation_thumb.png" src="../_images/sphx_glr_plot_coin_ward_segmentation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_coin_ward_segmentation.html#sphx-glr-auto-examples-cluster-plot-coin-ward-segmentation-py"><span class="std std-ref">A demo of structured Ward hierarchical clustering on an image of coins</span></a></span><a class="headerlink" href="#id36" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Finds core samples of high density and expands clusters from them."><div class="figure align-default" id="id37">
<img alt="../_images/sphx_glr_plot_dbscan_thumb.png" src="../_images/sphx_glr_plot_dbscan_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_dbscan.html#sphx-glr-auto-examples-cluster-plot-dbscan-py"><span class="std std-ref">Demo of DBSCAN clustering algorithm</span></a></span><a class="headerlink" href="#id37" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Performs a pixel-wise Vector Quantization (VQ) of an image of the summer palace (China), reduci..."><div class="figure align-default" id="id38">
<img alt="../_images/sphx_glr_plot_color_quantization_thumb.png" src="../_images/sphx_glr_plot_color_quantization_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_color_quantization.html#sphx-glr-auto-examples-cluster-plot-color-quantization-py"><span class="std std-ref">Color Quantization using K-Means</span></a></span><a class="headerlink" href="#id38" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Example builds a swiss roll dataset and runs hierarchical clustering on their position."><div class="figure align-default" id="id39">
<img alt="../_images/sphx_glr_plot_ward_structured_vs_unstructured_thumb.png" src="../_images/sphx_glr_plot_ward_structured_vs_unstructured_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_ward_structured_vs_unstructured.html#sphx-glr-auto-examples-cluster-plot-ward-structured-vs-unstructured-py"><span class="std std-ref">Hierarchical clustering: structured vs unstructured ward</span></a></span><a class="headerlink" href="#id39" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Demonstrates the effect of different metrics on the hierarchical clustering."><div class="figure align-default" id="id40">
<img alt="../_images/sphx_glr_plot_agglomerative_clustering_metrics_thumb.png" src="../_images/sphx_glr_plot_agglomerative_clustering_metrics_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_agglomerative_clustering_metrics.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-metrics-py"><span class="std std-ref">Agglomerative clustering with different metrics</span></a></span><a class="headerlink" href="#id40" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Clustering can be expensive, especially when our dataset contains millions of datapoints. Many ..."><div class="figure align-default" id="id41">
<img alt="../_images/sphx_glr_plot_inductive_clustering_thumb.png" src="../_images/sphx_glr_plot_inductive_clustering_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_inductive_clustering.html#sphx-glr-auto-examples-cluster-plot-inductive-clustering-py"><span class="std std-ref">Inductive Clustering</span></a></span><a class="headerlink" href="#id41" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Demo of OPTICS clustering algorithm"><div class="figure align-default" id="id42">
<img alt="../_images/sphx_glr_plot_optics_thumb.png" src="../_images/sphx_glr_plot_optics_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_optics.html#sphx-glr-auto-examples-cluster-plot-optics-py"><span class="std std-ref">Demo of OPTICS clustering algorithm</span></a></span><a class="headerlink" href="#id42" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example compares the timing of Birch (with and without the global clustering step) and Min..."><div class="figure align-default" id="id43">
<img alt="../_images/sphx_glr_plot_birch_vs_minibatchkmeans_thumb.png" src="../_images/sphx_glr_plot_birch_vs_minibatchkmeans_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_birch_vs_minibatchkmeans.html#sphx-glr-auto-examples-cluster-plot-birch-vs-minibatchkmeans-py"><span class="std std-ref">Compare BIRCH and MiniBatchKMeans</span></a></span><a class="headerlink" href="#id43" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Evaluate the ability of k-means initializations strategies to make the algorithm convergence ro..."><div class="figure align-default" id="id44">
<img alt="../_images/sphx_glr_plot_kmeans_stability_low_dim_dense_thumb.png" src="../_images/sphx_glr_plot_kmeans_stability_low_dim_dense_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_kmeans_stability_low_dim_dense.html#sphx-glr-auto-examples-cluster-plot-kmeans-stability-low-dim-dense-py"><span class="std std-ref">Empirical evaluation of the impact of k-means initialization</span></a></span><a class="headerlink" href="#id44" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The following plots demonstrate the impact of the number of clusters and number of samples on v..."><div class="figure align-default" id="id45">
<img alt="../_images/sphx_glr_plot_adjusted_for_chance_measures_thumb.png" src="../_images/sphx_glr_plot_adjusted_for_chance_measures_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_adjusted_for_chance_measures.html#sphx-glr-auto-examples-cluster-plot-adjusted-for-chance-measures-py"><span class="std std-ref">Adjustment for chance in clustering performance evaluation</span></a></span><a class="headerlink" href="#id45" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="We want to compare the performance of the MiniBatchKMeans and KMeans: the MiniBatchKMeans is fa..."><div class="figure align-default" id="id46">
<img alt="../_images/sphx_glr_plot_mini_batch_kmeans_thumb.png" src="../_images/sphx_glr_plot_mini_batch_kmeans_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_mini_batch_kmeans.html#sphx-glr-auto-examples-cluster-plot-mini-batch-kmeans-py"><span class="std std-ref">Comparison of the K-Means and MiniBatchKMeans clustering algorithms</span></a></span><a class="headerlink" href="#id46" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example compares 2 dimensionality reduction strategies:"><div class="figure align-default" id="id47">
<img alt="../_images/sphx_glr_plot_feature_agglomeration_vs_univariate_selection_thumb.png" src="../_images/sphx_glr_plot_feature_agglomeration_vs_univariate_selection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_feature_agglomeration_vs_univariate_selection.html#sphx-glr-auto-examples-cluster-plot-feature-agglomeration-vs-univariate-selection-py"><span class="std std-ref">Feature agglomeration vs. univariate selection</span></a></span><a class="headerlink" href="#id47" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example we compare the various initialization strategies for K-means in terms of runtim..."><div class="figure align-default" id="id48">
<img alt="../_images/sphx_glr_plot_kmeans_digits_thumb.png" src="../_images/sphx_glr_plot_kmeans_digits_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_kmeans_digits.html#sphx-glr-auto-examples-cluster-plot-kmeans-digits-py"><span class="std std-ref">A demo of K-Means clustering on the handwritten digits data</span></a></span><a class="headerlink" href="#id48" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different linkage methods for hierarchical clustering on ..."><div class="figure align-default" id="id49">
<img alt="../_images/sphx_glr_plot_linkage_comparison_thumb.png" src="../_images/sphx_glr_plot_linkage_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_linkage_comparison.html#sphx-glr-auto-examples-cluster-plot-linkage-comparison-py"><span class="std std-ref">Comparing different hierarchical linkage methods on toy datasets</span></a></span><a class="headerlink" href="#id49" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Silhouette analysis can be used to study the separation distance between the resulting clusters..."><div class="figure align-default" id="id50">
<img alt="../_images/sphx_glr_plot_kmeans_silhouette_analysis_thumb.png" src="../_images/sphx_glr_plot_kmeans_silhouette_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_kmeans_silhouette_analysis.html#sphx-glr-auto-examples-cluster-plot-kmeans-silhouette-analysis-py"><span class="std std-ref">Selecting the number of clusters with silhouette analysis on KMeans clustering</span></a></span><a class="headerlink" href="#id50" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows characteristics of different clustering algorithms on datasets that are &quot;int..."><div class="figure align-default" id="id51">
<img alt="../_images/sphx_glr_plot_cluster_comparison_thumb.png" src="../_images/sphx_glr_plot_cluster_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cluster/plot_cluster_comparison.html#sphx-glr-auto-examples-cluster-plot-cluster-comparison-py"><span class="std std-ref">Comparing different clustering algorithms on toy datasets</span></a></span><a class="headerlink" href="#id51" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="covariance-estimation">
<span id="covariance-examples"></span><span id="sphx-glr-auto-examples-covariance"></span><h2>Covariance estimation<a class="headerlink" href="#covariance-estimation" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.covariance" title="sklearn.covariance"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.covariance</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="The usual covariance maximum likelihood estimate can be regularized using shrinkage. Ledoit and..."><div class="figure align-default" id="id52">
<img alt="../_images/sphx_glr_plot_lw_vs_oas_thumb.png" src="../_images/sphx_glr_plot_lw_vs_oas_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="covariance/plot_lw_vs_oas.html#sphx-glr-auto-examples-covariance-plot-lw-vs-oas-py"><span class="std std-ref">Ledoit-Wolf vs OAS estimation</span></a></span><a class="headerlink" href="#id52" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Using the GraphicalLasso estimator to learn a covariance and sparse precision from a small numb..."><div class="figure align-default" id="id53">
<img alt="../_images/sphx_glr_plot_sparse_cov_thumb.png" src="../_images/sphx_glr_plot_sparse_cov_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="covariance/plot_sparse_cov.html#sphx-glr-auto-examples-covariance-plot-sparse-cov-py"><span class="std std-ref">Sparse inverse covariance estimation</span></a></span><a class="headerlink" href="#id53" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="When working with covariance estimation, the usual approach is to use a maximum likelihood esti..."><div class="figure align-default" id="id54">
<img alt="../_images/sphx_glr_plot_covariance_estimation_thumb.png" src="../_images/sphx_glr_plot_covariance_estimation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="covariance/plot_covariance_estimation.html#sphx-glr-auto-examples-covariance-plot-covariance-estimation-py"><span class="std std-ref">Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood</span></a></span><a class="headerlink" href="#id54" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example to show covariance estimation with the Mahalanobis distances on Gaussian distributed..."><div class="figure align-default" id="id55">
<img alt="../_images/sphx_glr_plot_mahalanobis_distances_thumb.png" src="../_images/sphx_glr_plot_mahalanobis_distances_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="covariance/plot_mahalanobis_distances.html#sphx-glr-auto-examples-covariance-plot-mahalanobis-distances-py"><span class="std std-ref">Robust covariance estimation and Mahalanobis distances relevance</span></a></span><a class="headerlink" href="#id55" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The usual covariance maximum likelihood estimate is very sensitive to the presence of outliers ..."><div class="figure align-default" id="id56">
<img alt="../_images/sphx_glr_plot_robust_vs_empirical_covariance_thumb.png" src="../_images/sphx_glr_plot_robust_vs_empirical_covariance_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="covariance/plot_robust_vs_empirical_covariance.html#sphx-glr-auto-examples-covariance-plot-robust-vs-empirical-covariance-py"><span class="std std-ref">Robust vs Empirical covariance estimate</span></a></span><a class="headerlink" href="#id56" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="cross-decomposition">
<span id="cross-decomposition-examples"></span><span id="sphx-glr-auto-examples-cross-decomposition"></span><h2>Cross decomposition<a class="headerlink" href="#cross-decomposition" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.cross_decomposition" title="sklearn.cross_decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.cross_decomposition</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Simple usage of various cross decomposition algorithms: - PLSCanonical - PLSRegression, with mu..."><div class="figure align-default" id="id57">
<img alt="../_images/sphx_glr_plot_compare_cross_decomposition_thumb.png" src="../_images/sphx_glr_plot_compare_cross_decomposition_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="cross_decomposition/plot_compare_cross_decomposition.html#sphx-glr-auto-examples-cross-decomposition-plot-compare-cross-decomposition-py"><span class="std std-ref">Compare cross decomposition methods</span></a></span><a class="headerlink" href="#id57" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="dataset-examples">
<span id="sphx-glr-auto-examples-datasets"></span><span id="id1"></span><h2>Dataset examples<a class="headerlink" href="#dataset-examples" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.datasets" title="sklearn.datasets"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.datasets</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This dataset is made up of 1797 8x8 images. Each image, like the one shown below, is of a hand-..."><div class="figure align-default" id="id58">
<img alt="../_images/sphx_glr_plot_digits_last_image_thumb.png" src="../_images/sphx_glr_plot_digits_last_image_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="datasets/plot_digits_last_image.html#sphx-glr-auto-examples-datasets-plot-digits-last-image-py"><span class="std std-ref">The Digit Dataset</span></a></span><a class="headerlink" href="#id58" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The rows being the samples and the columns being: Sepal Length, Sepal Width, Petal Length and P..."><div class="figure align-default" id="id59">
<img alt="../_images/sphx_glr_plot_iris_dataset_thumb.png" src="../_images/sphx_glr_plot_iris_dataset_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="datasets/plot_iris_dataset.html#sphx-glr-auto-examples-datasets-plot-iris-dataset-py"><span class="std std-ref">The Iris Dataset</span></a></span><a class="headerlink" href="#id59" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot several randomly generated 2D classification datasets. This example illustrates the datase..."><div class="figure align-default" id="id60">
<img alt="../_images/sphx_glr_plot_random_dataset_thumb.png" src="../_images/sphx_glr_plot_random_dataset_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="datasets/plot_random_dataset.html#sphx-glr-auto-examples-datasets-plot-random-dataset-py"><span class="std std-ref">Plot randomly generated classification dataset</span></a></span><a class="headerlink" href="#id60" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This illustrates the make_multilabel_classification dataset generator. Each sample consists of ..."><div class="figure align-default" id="id61">
<img alt="../_images/sphx_glr_plot_random_multilabel_dataset_thumb.png" src="../_images/sphx_glr_plot_random_multilabel_dataset_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="datasets/plot_random_multilabel_dataset.html#sphx-glr-auto-examples-datasets-plot-random-multilabel-dataset-py"><span class="std std-ref">Plot randomly generated multilabel dataset</span></a></span><a class="headerlink" href="#id61" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="decision-trees">
<span id="tree-examples"></span><span id="sphx-glr-auto-examples-tree"></span><h2>Decision Trees<a class="headerlink" href="#decision-trees" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.tree" title="sklearn.tree"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.tree</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="A 1D regression with decision tree."><div class="figure align-default" id="id62">
<img alt="../_images/sphx_glr_plot_tree_regression_thumb.png" src="../_images/sphx_glr_plot_tree_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="tree/plot_tree_regression.html#sphx-glr-auto-examples-tree-plot-tree-regression-py"><span class="std std-ref">Decision Tree Regression</span></a></span><a class="headerlink" href="#id62" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example to illustrate multi-output regression with decision tree."><div class="figure align-default" id="id63">
<img alt="../_images/sphx_glr_plot_tree_regression_multioutput_thumb.png" src="../_images/sphx_glr_plot_tree_regression_multioutput_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="tree/plot_tree_regression_multioutput.html#sphx-glr-auto-examples-tree-plot-tree-regression-multioutput-py"><span class="std std-ref">Multi-output Decision Tree Regression</span></a></span><a class="headerlink" href="#id63" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the decision surface of a decision tree trained on pairs of features of the iris dataset."><div class="figure align-default" id="id64">
<img alt="../_images/sphx_glr_plot_iris_dtc_thumb.png" src="../_images/sphx_glr_plot_iris_dtc_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="tree/plot_iris_dtc.html#sphx-glr-auto-examples-tree-plot-iris-dtc-py"><span class="std std-ref">Plot the decision surface of a decision tree on the iris dataset</span></a></span><a class="headerlink" href="#id64" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The DecisionTreeClassifier provides parameters such as min_samples_leaf and max_depth to preven..."><div class="figure align-default" id="id65">
<img alt="../_images/sphx_glr_plot_cost_complexity_pruning_thumb.png" src="../_images/sphx_glr_plot_cost_complexity_pruning_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="tree/plot_cost_complexity_pruning.html#sphx-glr-auto-examples-tree-plot-cost-complexity-pruning-py"><span class="std std-ref">Post pruning decision trees with cost complexity pruning</span></a></span><a class="headerlink" href="#id65" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The decision tree structure can be analysed to gain further insight on the relation between the..."><div class="figure align-default" id="id66">
<img alt="../_images/sphx_glr_plot_unveil_tree_structure_thumb.png" src="../_images/sphx_glr_plot_unveil_tree_structure_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="tree/plot_unveil_tree_structure.html#sphx-glr-auto-examples-tree-plot-unveil-tree-structure-py"><span class="std std-ref">Understanding the decision tree structure</span></a></span><a class="headerlink" href="#id66" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="decomposition">
<span id="decomposition-examples"></span><span id="sphx-glr-auto-examples-decomposition"></span><h2>Decomposition<a class="headerlink" href="#decomposition" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.decomposition" title="sklearn.decomposition"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.decomposition</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="A plot that compares the various Beta-divergence loss functions supported by the Multiplicative..."><div class="figure align-default" id="id67">
<img alt="../_images/sphx_glr_plot_beta_divergence_thumb.png" src="../_images/sphx_glr_plot_beta_divergence_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_beta_divergence.html#sphx-glr-auto-examples-decomposition-plot-beta-divergence-py"><span class="std std-ref">Beta-divergence loss functions</span></a></span><a class="headerlink" href="#id67" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Principal Component Analysis applied to the Iris dataset."><div class="figure align-default" id="id68">
<img alt="../_images/sphx_glr_plot_pca_iris_thumb.png" src="../_images/sphx_glr_plot_pca_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_pca_iris.html#sphx-glr-auto-examples-decomposition-plot-pca-iris-py"><span class="std std-ref">PCA example with Iris Data-set</span></a></span><a class="headerlink" href="#id68" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Incremental principal component analysis (IPCA) is typically used as a replacement for principa..."><div class="figure align-default" id="id69">
<img alt="../_images/sphx_glr_plot_incremental_pca_thumb.png" src="../_images/sphx_glr_plot_incremental_pca_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_incremental_pca.html#sphx-glr-auto-examples-decomposition-plot-incremental-pca-py"><span class="std std-ref">Incremental PCA</span></a></span><a class="headerlink" href="#id69" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The Iris dataset represents 3 kind of Iris flowers (Setosa, Versicolour and Virginica) with 4 a..."><div class="figure align-default" id="id70">
<img alt="../_images/sphx_glr_plot_pca_vs_lda_thumb.png" src="../_images/sphx_glr_plot_pca_vs_lda_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_pca_vs_lda.html#sphx-glr-auto-examples-decomposition-plot-pca-vs-lda-py"><span class="std std-ref">Comparison of LDA and PCA 2D projection of Iris dataset</span></a></span><a class="headerlink" href="#id70" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example of estimating sources from noisy data."><div class="figure align-default" id="id71">
<img alt="../_images/sphx_glr_plot_ica_blind_source_separation_thumb.png" src="../_images/sphx_glr_plot_ica_blind_source_separation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_ica_blind_source_separation.html#sphx-glr-auto-examples-decomposition-plot-ica-blind-source-separation-py"><span class="std std-ref">Blind source separation using FastICA</span></a></span><a class="headerlink" href="#id71" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="These figures aid in illustrating how a point cloud can be very flat in one direction--which is..."><div class="figure align-default" id="id72">
<img alt="../_images/sphx_glr_plot_pca_3d_thumb.png" src="../_images/sphx_glr_plot_pca_3d_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_pca_3d.html#sphx-glr-auto-examples-decomposition-plot-pca-3d-py"><span class="std std-ref">Principal components analysis (PCA)</span></a></span><a class="headerlink" href="#id72" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates visually in the feature space a comparison by results using two differ..."><div class="figure align-default" id="id73">
<img alt="../_images/sphx_glr_plot_ica_vs_pca_thumb.png" src="../_images/sphx_glr_plot_ica_vs_pca_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_ica_vs_pca.html#sphx-glr-auto-examples-decomposition-plot-ica-vs-pca-py"><span class="std std-ref">FastICA on 2D point clouds</span></a></span><a class="headerlink" href="#id73" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows that Kernel PCA is able to find a projection of the data that makes data lin..."><div class="figure align-default" id="id74">
<img alt="../_images/sphx_glr_plot_kernel_pca_thumb.png" src="../_images/sphx_glr_plot_kernel_pca_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_kernel_pca.html#sphx-glr-auto-examples-decomposition-plot-kernel-pca-py"><span class="std std-ref">Kernel PCA</span></a></span><a class="headerlink" href="#id74" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Probabilistic PCA and Factor Analysis are probabilistic models. The consequence is that the lik..."><div class="figure align-default" id="id75">
<img alt="../_images/sphx_glr_plot_pca_vs_fa_model_selection_thumb.png" src="../_images/sphx_glr_plot_pca_vs_fa_model_selection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_pca_vs_fa_model_selection.html#sphx-glr-auto-examples-decomposition-plot-pca-vs-fa-model-selection-py"><span class="std std-ref">Model selection with Probabilistic PCA and Factor Analysis (FA)</span></a></span><a class="headerlink" href="#id75" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Transform a signal as a sparse combination of Ricker wavelets. This example visually compares d..."><div class="figure align-default" id="id76">
<img alt="../_images/sphx_glr_plot_sparse_coding_thumb.png" src="../_images/sphx_glr_plot_sparse_coding_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_sparse_coding.html#sphx-glr-auto-examples-decomposition-plot-sparse-coding-py"><span class="std std-ref">Sparse coding with a precomputed dictionary</span></a></span><a class="headerlink" href="#id76" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example comparing the effect of reconstructing noisy fragments of a raccoon face image using..."><div class="figure align-default" id="id77">
<img alt="../_images/sphx_glr_plot_image_denoising_thumb.png" src="../_images/sphx_glr_plot_image_denoising_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_image_denoising.html#sphx-glr-auto-examples-decomposition-plot-image-denoising-py"><span class="std std-ref">Image denoising using dictionary learning</span></a></span><a class="headerlink" href="#id77" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example applies to olivetti_faces_dataset different unsupervised matrix decomposition (dim..."><div class="figure align-default" id="id78">
<img alt="../_images/sphx_glr_plot_faces_decomposition_thumb.png" src="../_images/sphx_glr_plot_faces_decomposition_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="decomposition/plot_faces_decomposition.html#sphx-glr-auto-examples-decomposition-plot-faces-decomposition-py"><span class="std std-ref">Faces dataset decompositions</span></a></span><a class="headerlink" href="#id78" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="ensemble-methods">
<span id="ensemble-examples"></span><span id="sphx-glr-auto-examples-ensemble"></span><h2>Ensemble methods<a class="headerlink" href="#ensemble-methods" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.ensemble" title="sklearn.ensemble"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.ensemble</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows the use of forests of trees to evaluate the importance of the pixels in an i..."><div class="figure align-default" id="id79">
<img alt="../_images/sphx_glr_plot_forest_importances_faces_thumb.png" src="../_images/sphx_glr_plot_forest_importances_faces_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_forest_importances_faces.html#sphx-glr-auto-examples-ensemble-plot-forest-importances-faces-py"><span class="std std-ref">Pixel importances with a parallel forest of trees</span></a></span><a class="headerlink" href="#id79" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A decision tree is boosted using the AdaBoost.R2 [1]_ algorithm on a 1D sinusoidal dataset with..."><div class="figure align-default" id="id80">
<img alt="../_images/sphx_glr_plot_adaboost_regression_thumb.png" src="../_images/sphx_glr_plot_adaboost_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_adaboost_regression.html#sphx-glr-auto-examples-ensemble-plot-adaboost-regression-py"><span class="std std-ref">Decision Tree Regression with AdaBoost</span></a></span><a class="headerlink" href="#id80" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot individual and averaged regression predictions for Boston dataset."><div class="figure align-default" id="id81">
<img alt="../_images/sphx_glr_plot_voting_regressor_thumb.png" src="../_images/sphx_glr_plot_voting_regressor_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_voting_regressor.html#sphx-glr-auto-examples-ensemble-plot-voting-regressor-py"><span class="std std-ref">Plot individual and voting regression predictions</span></a></span><a class="headerlink" href="#id81" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This examples shows the use of forests of trees to evaluate the importance of features on an ar..."><div class="figure align-default" id="id82">
<img alt="../_images/sphx_glr_plot_forest_importances_thumb.png" src="../_images/sphx_glr_plot_forest_importances_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_forest_importances.html#sphx-glr-auto-examples-ensemble-plot-forest-importances-py"><span class="std std-ref">Feature importances with forests of trees</span></a></span><a class="headerlink" href="#id82" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example using sklearn.ensemble.IsolationForest for anomaly detection."><div class="figure align-default" id="id83">
<img alt="../_images/sphx_glr_plot_isolation_forest_thumb.png" src="../_images/sphx_glr_plot_isolation_forest_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_isolation_forest.html#sphx-glr-auto-examples-ensemble-plot-isolation-forest-py"><span class="std std-ref">IsolationForest example</span></a></span><a class="headerlink" href="#id83" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the decision boundaries of a VotingClassifier for two features of the Iris dataset."><div class="figure align-default" id="id84">
<img alt="../_images/sphx_glr_plot_voting_decision_regions_thumb.png" src="../_images/sphx_glr_plot_voting_decision_regions_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_voting_decision_regions.html#sphx-glr-auto-examples-ensemble-plot-voting-decision-regions-py"><span class="std std-ref">Plot the decision boundaries of a VotingClassifier</span></a></span><a class="headerlink" href="#id84" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example to compare multi-output regression with random forest and the multiclass meta-estima..."><div class="figure align-default" id="id85">
<img alt="../_images/sphx_glr_plot_random_forest_regression_multioutput_thumb.png" src="../_images/sphx_glr_plot_random_forest_regression_multioutput_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_random_forest_regression_multioutput.html#sphx-glr-auto-examples-ensemble-plot-random-forest-regression-multioutput-py"><span class="std std-ref">Comparing random forests and the multi-output meta estimator</span></a></span><a class="headerlink" href="#id85" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how quantile regression can be used to create prediction intervals. "><div class="figure align-default" id="id86">
<img alt="../_images/sphx_glr_plot_gradient_boosting_quantile_thumb.png" src="../_images/sphx_glr_plot_gradient_boosting_quantile_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_gradient_boosting_quantile.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-quantile-py"><span class="std std-ref">Prediction Intervals for Gradient Boosting Regression</span></a></span><a class="headerlink" href="#id86" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Illustration of the effect of different regularization strategies for Gradient Boosting. The ex..."><div class="figure align-default" id="id87">
<img alt="../_images/sphx_glr_plot_gradient_boosting_regularization_thumb.png" src="../_images/sphx_glr_plot_gradient_boosting_regularization_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_gradient_boosting_regularization.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-regularization-py"><span class="std std-ref">Gradient Boosting regularization</span></a></span><a class="headerlink" href="#id87" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the class probabilities of the first sample in a toy dataset predicted by three different ..."><div class="figure align-default" id="id88">
<img alt="../_images/sphx_glr_plot_voting_probas_thumb.png" src="../_images/sphx_glr_plot_voting_probas_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_voting_probas.html#sphx-glr-auto-examples-ensemble-plot-voting-probas-py"><span class="std std-ref">Plot class probabilities calculated by the VotingClassifier</span></a></span><a class="headerlink" href="#id88" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Demonstrate Gradient Boosting on the Boston housing dataset."><div class="figure align-default" id="id89">
<img alt="../_images/sphx_glr_plot_gradient_boosting_regression_thumb.png" src="../_images/sphx_glr_plot_gradient_boosting_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_gradient_boosting_regression.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-regression-py"><span class="std std-ref">Gradient Boosting regression</span></a></span><a class="headerlink" href="#id89" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The RandomForestClassifier is trained using *bootstrap aggregation*, where each new tree is fit..."><div class="figure align-default" id="id90">
<img alt="../_images/sphx_glr_plot_ensemble_oob_thumb.png" src="../_images/sphx_glr_plot_ensemble_oob_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_ensemble_oob.html#sphx-glr-auto-examples-ensemble-plot-ensemble-oob-py"><span class="std std-ref">OOB Errors for Random Forests</span></a></span><a class="headerlink" href="#id90" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example fits an AdaBoosted decision stump on a non-linearly separable classification datas..."><div class="figure align-default" id="id91">
<img alt="../_images/sphx_glr_plot_adaboost_twoclass_thumb.png" src="../_images/sphx_glr_plot_adaboost_twoclass_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_adaboost_twoclass.html#sphx-glr-auto-examples-ensemble-plot-adaboost-twoclass-py"><span class="std std-ref">Two-class AdaBoost</span></a></span><a class="headerlink" href="#id91" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="RandomTreesEmbedding provides a way to map data to a very high-dimensional, sparse representati..."><div class="figure align-default" id="id92">
<img alt="../_images/sphx_glr_plot_random_forest_embedding_thumb.png" src="../_images/sphx_glr_plot_random_forest_embedding_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_random_forest_embedding.html#sphx-glr-auto-examples-ensemble-plot-random-forest-embedding-py"><span class="std std-ref">Hashing feature transformation using Totally Random Trees</span></a></span><a class="headerlink" href="#id92" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example reproduces Figure 1 of Zhu et al [1]_ and shows how boosting can improve predictio..."><div class="figure align-default" id="id93">
<img alt="../_images/sphx_glr_plot_adaboost_multiclass_thumb.png" src="../_images/sphx_glr_plot_adaboost_multiclass_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_adaboost_multiclass.html#sphx-glr-auto-examples-ensemble-plot-adaboost-multiclass-py"><span class="std std-ref">Multi-class AdaBoosted Decision Trees</span></a></span><a class="headerlink" href="#id93" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example is based on Figure 10.2 from Hastie et al 2009 [1]_ and illustrates the difference..."><div class="figure align-default" id="id94">
<img alt="../_images/sphx_glr_plot_adaboost_hastie_10_2_thumb.png" src="../_images/sphx_glr_plot_adaboost_hastie_10_2_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_adaboost_hastie_10_2.html#sphx-glr-auto-examples-ensemble-plot-adaboost-hastie-10-2-py"><span class="std std-ref">Discrete versus Real AdaBoost</span></a></span><a class="headerlink" href="#id94" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Stacking refers to a method to blend estimators. In this strategy, some estimators are individu..."><div class="figure align-default" id="id95">
<img alt="../_images/sphx_glr_plot_stack_predictors_thumb.png" src="../_images/sphx_glr_plot_stack_predictors_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_stack_predictors.html#sphx-glr-auto-examples-ensemble-plot-stack-predictors-py"><span class="std std-ref">Combine predictors using stacking</span></a></span><a class="headerlink" href="#id95" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Gradient boosting is an ensembling technique where several weak learners (regression trees) are..."><div class="figure align-default" id="id96">
<img alt="../_images/sphx_glr_plot_gradient_boosting_early_stopping_thumb.png" src="../_images/sphx_glr_plot_gradient_boosting_early_stopping_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_gradient_boosting_early_stopping.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-early-stopping-py"><span class="std std-ref">Early stopping of Gradient Boosting</span></a></span><a class="headerlink" href="#id96" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Transform your features into a higher dimensional, sparse space. Then train a linear model on t..."><div class="figure align-default" id="id97">
<img alt="../_images/sphx_glr_plot_feature_transformation_thumb.png" src="../_images/sphx_glr_plot_feature_transformation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_feature_transformation.html#sphx-glr-auto-examples-ensemble-plot-feature-transformation-py"><span class="std std-ref">Feature transformations with ensembles of trees</span></a></span><a class="headerlink" href="#id97" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Out-of-bag (OOB) estimates can be a useful heuristic to estimate the &quot;optimal&quot; number of boosti..."><div class="figure align-default" id="id98">
<img alt="../_images/sphx_glr_plot_gradient_boosting_oob_thumb.png" src="../_images/sphx_glr_plot_gradient_boosting_oob_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_gradient_boosting_oob.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-oob-py"><span class="std std-ref">Gradient Boosting Out-of-Bag estimates</span></a></span><a class="headerlink" href="#id98" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates and compares the bias-variance decomposition of the expected mean squa..."><div class="figure align-default" id="id99">
<img alt="../_images/sphx_glr_plot_bias_variance_thumb.png" src="../_images/sphx_glr_plot_bias_variance_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_bias_variance.html#sphx-glr-auto-examples-ensemble-plot-bias-variance-py"><span class="std std-ref">Single estimator versus bagging: bias-variance decomposition</span></a></span><a class="headerlink" href="#id99" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the decision surfaces of forests of randomized trees trained on pairs of features of the i..."><div class="figure align-default" id="id100">
<img alt="../_images/sphx_glr_plot_forest_iris_thumb.png" src="../_images/sphx_glr_plot_forest_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="ensemble/plot_forest_iris.html#sphx-glr-auto-examples-ensemble-plot-forest-iris-py"><span class="std std-ref">Plot the decision surfaces of ensembles of trees on the iris dataset</span></a></span><a class="headerlink" href="#id100" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="examples-based-on-real-world-datasets">
<span id="realworld-examples"></span><span id="sphx-glr-auto-examples-applications"></span><h2>Examples based on real world datasets<a class="headerlink" href="#examples-based-on-real-world-datasets" title="Permalink to this headline">¶</a></h2>
<p>Applications to real world problems with some medium sized datasets or
interactive user interface.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the need for robust covariance estimation on a real data set. It is us..."><div class="figure align-default" id="id101">
<img alt="../_images/sphx_glr_plot_outlier_detection_housing_thumb.png" src="../_images/sphx_glr_plot_outlier_detection_housing_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_outlier_detection_housing.html#sphx-glr-auto-examples-applications-plot-outlier-detection-housing-py"><span class="std std-ref">Outlier detection on a real data set</span></a></span><a class="headerlink" href="#id101" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows the reconstruction of an image from a set of parallel projections, acquired ..."><div class="figure align-default" id="id102">
<img alt="../_images/sphx_glr_plot_tomography_l1_reconstruction_thumb.png" src="../_images/sphx_glr_plot_tomography_l1_reconstruction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_tomography_l1_reconstruction.html#sphx-glr-auto-examples-applications-plot-tomography-l1-reconstruction-py"><span class="std std-ref">Compressive sensing: tomography reconstruction with L1 prior (Lasso)</span></a></span><a class="headerlink" href="#id102" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This is an example of applying sklearn.decomposition.NMF and sklearn.decomposition.LatentDirich..."><div class="figure align-default" id="id103">
<img alt="../_images/sphx_glr_plot_topics_extraction_with_nmf_lda_thumb.png" src="../_images/sphx_glr_plot_topics_extraction_with_nmf_lda_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_topics_extraction_with_nmf_lda.html#sphx-glr-auto-examples-applications-plot-topics-extraction-with-nmf-lda-py"><span class="std std-ref">Topic extraction with Non-negative Matrix Factorization and Latent Dirichlet Allocation</span></a></span><a class="headerlink" href="#id103" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The dataset used in this example is a preprocessed excerpt of the &quot;Labeled Faces in the Wild&quot;, ..."><div class="figure align-default" id="id104">
<img alt="../_images/sphx_glr_plot_face_recognition_thumb.png" src="../_images/sphx_glr_plot_face_recognition_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_face_recognition.html#sphx-glr-auto-examples-applications-plot-face-recognition-py"><span class="std std-ref">Faces recognition example using eigenfaces and SVMs</span></a></span><a class="headerlink" href="#id104" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Demonstrate how model complexity influences both prediction accuracy and computational performa..."><div class="figure align-default" id="id105">
<img alt="../_images/sphx_glr_plot_model_complexity_influence_thumb.png" src="../_images/sphx_glr_plot_model_complexity_influence_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_model_complexity_influence.html#sphx-glr-auto-examples-applications-plot-model-complexity-influence-py"><span class="std std-ref">Model Complexity Influence</span></a></span><a class="headerlink" href="#id105" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example employs several unsupervised learning techniques to extract the stock market struc..."><div class="figure align-default" id="id106">
<img alt="../_images/sphx_glr_plot_stock_market_thumb.png" src="../_images/sphx_glr_plot_stock_market_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_stock_market.html#sphx-glr-auto-examples-applications-plot-stock-market-py"><span class="std std-ref">Visualizing the stock market structure</span></a></span><a class="headerlink" href="#id106" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A classical way to assert the relative importance of vertices in a graph is to compute the prin..."><div class="figure align-default" id="id107">
<img alt="../_images/sphx_glr_wikipedia_principal_eigenvector_thumb.png" src="../_images/sphx_glr_wikipedia_principal_eigenvector_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/wikipedia_principal_eigenvector.html#sphx-glr-auto-examples-applications-wikipedia-principal-eigenvector-py"><span class="std std-ref">Wikipedia principal eigenvector</span></a></span><a class="headerlink" href="#id107" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Modeling species&#x27; geographic distributions is an important problem in conservation biology. In ..."><div class="figure align-default" id="id108">
<img alt="../_images/sphx_glr_plot_species_distribution_modeling_thumb.png" src="../_images/sphx_glr_plot_species_distribution_modeling_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_species_distribution_modeling.html#sphx-glr-auto-examples-applications-plot-species-distribution-modeling-py"><span class="std std-ref">Species distribution modeling</span></a></span><a class="headerlink" href="#id108" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A simple graphical frontend for Libsvm mainly intended for didactic purposes. You can create da..."><div class="figure align-default" id="id109">
<img alt="../_images/sphx_glr_svm_gui_thumb.png" src="../_images/sphx_glr_svm_gui_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/svm_gui.html#sphx-glr-auto-examples-applications-svm-gui-py"><span class="std std-ref">Libsvm GUI</span></a></span><a class="headerlink" href="#id109" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This is an example showing the prediction latency of various scikit-learn estimators."><div class="figure align-default" id="id110">
<img alt="../_images/sphx_glr_plot_prediction_latency_thumb.png" src="../_images/sphx_glr_plot_prediction_latency_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_prediction_latency.html#sphx-glr-auto-examples-applications-plot-prediction-latency-py"><span class="std std-ref">Prediction Latency</span></a></span><a class="headerlink" href="#id110" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how scikit-learn can be used for classification using an out-of-core..."><div class="figure align-default" id="id111">
<img alt="../_images/sphx_glr_plot_out_of_core_classification_thumb.png" src="../_images/sphx_glr_plot_out_of_core_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="applications/plot_out_of_core_classification.html#sphx-glr-auto-examples-applications-plot-out-of-core-classification-py"><span class="std std-ref">Out-of-core classification of text documents</span></a></span><a class="headerlink" href="#id111" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="feature-selection">
<span id="feature-selection-examples"></span><span id="sphx-glr-auto-examples-feature-selection"></span><h2>Feature Selection<a class="headerlink" href="#feature-selection" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.feature_selection" title="sklearn.feature_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_selection</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="A recursive feature elimination example showing the relevance of pixels in a digit classificati..."><div class="figure align-default" id="id112">
<img alt="../_images/sphx_glr_plot_rfe_digits_thumb.png" src="../_images/sphx_glr_plot_rfe_digits_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_rfe_digits.html#sphx-glr-auto-examples-feature-selection-plot-rfe-digits-py"><span class="std std-ref">Recursive feature elimination</span></a></span><a class="headerlink" href="#id112" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the differences between univariate F-test statistics and mutual inform..."><div class="figure align-default" id="id113">
<img alt="../_images/sphx_glr_plot_f_test_vs_mi_thumb.png" src="../_images/sphx_glr_plot_f_test_vs_mi_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_f_test_vs_mi.html#sphx-glr-auto-examples-feature-selection-plot-f-test-vs-mi-py"><span class="std std-ref">Comparison of F-test and mutual information</span></a></span><a class="headerlink" href="#id113" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Simple usage of Pipeline that runs successively a univariate feature selection with anova and t..."><div class="figure align-default" id="id114">
<img alt="../_images/sphx_glr_plot_feature_selection_pipeline_thumb.png" src="../_images/sphx_glr_plot_feature_selection_pipeline_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_feature_selection_pipeline.html#sphx-glr-auto-examples-feature-selection-plot-feature-selection-pipeline-py"><span class="std std-ref">Pipeline Anova SVM</span></a></span><a class="headerlink" href="#id114" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A recursive feature elimination example with automatic tuning of the number of features selecte..."><div class="figure align-default" id="id115">
<img alt="../_images/sphx_glr_plot_rfe_with_cross_validation_thumb.png" src="../_images/sphx_glr_plot_rfe_with_cross_validation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_rfe_with_cross_validation.html#sphx-glr-auto-examples-feature-selection-plot-rfe-with-cross-validation-py"><span class="std std-ref">Recursive feature elimination with cross-validation</span></a></span><a class="headerlink" href="#id115" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Use SelectFromModel meta-transformer along with Lasso to select the best couple of features fro..."><div class="figure align-default" id="id116">
<img alt="../_images/sphx_glr_plot_select_from_model_boston_thumb.png" src="../_images/sphx_glr_plot_select_from_model_boston_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_select_from_model_boston.html#sphx-glr-auto-examples-feature-selection-plot-select-from-model-boston-py"><span class="std std-ref">Feature selection using SelectFromModel and LassoCV</span></a></span><a class="headerlink" href="#id116" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In order to test if a classification score is significative a technique in repeating the classi..."><div class="figure align-default" id="id117">
<img alt="../_images/sphx_glr_plot_permutation_test_for_classification_thumb.png" src="../_images/sphx_glr_plot_permutation_test_for_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_permutation_test_for_classification.html#sphx-glr-auto-examples-feature-selection-plot-permutation-test-for-classification-py"><span class="std std-ref">Test with permutations the significance of a classification score</span></a></span><a class="headerlink" href="#id117" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example showing univariate feature selection."><div class="figure align-default" id="id118">
<img alt="../_images/sphx_glr_plot_feature_selection_thumb.png" src="../_images/sphx_glr_plot_feature_selection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="feature_selection/plot_feature_selection.html#sphx-glr-auto-examples-feature-selection-plot-feature-selection-py"><span class="std std-ref">Univariate Feature Selection</span></a></span><a class="headerlink" href="#id118" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="gaussian-mixture-models">
<span id="mixture-examples"></span><span id="sphx-glr-auto-examples-mixture"></span><h2>Gaussian Mixture Models<a class="headerlink" href="#gaussian-mixture-models" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.mixture" title="sklearn.mixture"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.mixture</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the density estimation of a mixture of two Gaussians. Data is generated from two Gaussians..."><div class="figure align-default" id="id119">
<img alt="../_images/sphx_glr_plot_gmm_pdf_thumb.png" src="../_images/sphx_glr_plot_gmm_pdf_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="mixture/plot_gmm_pdf.html#sphx-glr-auto-examples-mixture-plot-gmm-pdf-py"><span class="std std-ref">Density Estimation for a Gaussian mixture</span></a></span><a class="headerlink" href="#id119" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the confidence ellipsoids of a mixture of two Gaussians obtained with Expectation Maximisa..."><div class="figure align-default" id="id120">
<img alt="../_images/sphx_glr_plot_gmm_thumb.png" src="../_images/sphx_glr_plot_gmm_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="mixture/plot_gmm.html#sphx-glr-auto-examples-mixture-plot-gmm-py"><span class="std std-ref">Gaussian Mixture Model Ellipsoids</span></a></span><a class="headerlink" href="#id120" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows that model selection can be performed with Gaussian Mixture Models using inf..."><div class="figure align-default" id="id121">
<img alt="../_images/sphx_glr_plot_gmm_selection_thumb.png" src="../_images/sphx_glr_plot_gmm_selection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="mixture/plot_gmm_selection.html#sphx-glr-auto-examples-mixture-plot-gmm-selection-py"><span class="std std-ref">Gaussian Mixture Model Selection</span></a></span><a class="headerlink" href="#id121" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Demonstration of several covariances types for Gaussian mixture models."><div class="figure align-default" id="id122">
<img alt="../_images/sphx_glr_plot_gmm_covariances_thumb.png" src="../_images/sphx_glr_plot_gmm_covariances_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="mixture/plot_gmm_covariances.html#sphx-glr-auto-examples-mixture-plot-gmm-covariances-py"><span class="std std-ref">GMM covariances</span></a></span><a class="headerlink" href="#id122" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the behavior of Gaussian mixture models fit on data that was not samp..."><div class="figure align-default" id="id123">
<img alt="../_images/sphx_glr_plot_gmm_sin_thumb.png" src="../_images/sphx_glr_plot_gmm_sin_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="mixture/plot_gmm_sin.html#sphx-glr-auto-examples-mixture-plot-gmm-sin-py"><span class="std std-ref">Gaussian Mixture Model Sine Curve</span></a></span><a class="headerlink" href="#id123" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example plots the ellipsoids obtained from a toy dataset (mixture of three Gaussians) fitt..."><div class="figure align-default" id="id124">
<img alt="../_images/sphx_glr_plot_concentration_prior_thumb.png" src="../_images/sphx_glr_plot_concentration_prior_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="mixture/plot_concentration_prior.html#sphx-glr-auto-examples-mixture-plot-concentration-prior-py"><span class="std std-ref">Concentration Prior Type Analysis of Variation Bayesian Gaussian Mixture</span></a></span><a class="headerlink" href="#id124" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="gaussian-process-for-machine-learning">
<span id="gaussian-process-examples"></span><span id="sphx-glr-auto-examples-gaussian-process"></span><h2>Gaussian Process for Machine Learning<a class="headerlink" href="#gaussian-process-for-machine-learning" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.gaussian_process" title="sklearn.gaussian_process"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.gaussian_process</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates GPC on XOR data. Compared are a stationary, isotropic kernel (RBF) and..."><div class="figure align-default" id="id125">
<img alt="../_images/sphx_glr_plot_gpc_xor_thumb.png" src="../_images/sphx_glr_plot_gpc_xor_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpc_xor.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-xor-py"><span class="std std-ref">Illustration of Gaussian process classification (GPC) on the XOR dataset</span></a></span><a class="headerlink" href="#id125" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an isotropic and anisotropic RBF ..."><div class="figure align-default" id="id126">
<img alt="../_images/sphx_glr_plot_gpc_iris_thumb.png" src="../_images/sphx_glr_plot_gpc_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpc_iris.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-iris-py"><span class="std std-ref">Gaussian process classification (GPC) on iris dataset</span></a></span><a class="headerlink" href="#id126" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Both kernel ridge regression (KRR) and Gaussian process regression (GPR) learn a target functio..."><div class="figure align-default" id="id127">
<img alt="../_images/sphx_glr_plot_compare_gpr_krr_thumb.png" src="../_images/sphx_glr_plot_compare_gpr_krr_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_compare_gpr_krr.html#sphx-glr-auto-examples-gaussian-process-plot-compare-gpr-krr-py"><span class="std std-ref">Comparison of kernel ridge and Gaussian process regression</span></a></span><a class="headerlink" href="#id127" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the prior and posterior of a GPR with different kernels. Mean, standar..."><div class="figure align-default" id="id128">
<img alt="../_images/sphx_glr_plot_gpr_prior_posterior_thumb.png" src="../_images/sphx_glr_plot_gpr_prior_posterior_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpr_prior_posterior.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-prior-posterior-py"><span class="std std-ref">Illustration of prior and posterior Gaussian process for different kernels</span></a></span><a class="headerlink" href="#id128" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A two-dimensional classification example showing iso-probability lines for the predicted probab..."><div class="figure align-default" id="id129">
<img alt="../_images/sphx_glr_plot_gpc_isoprobability_thumb.png" src="../_images/sphx_glr_plot_gpc_isoprobability_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpc_isoprobability.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-isoprobability-py"><span class="std std-ref">Iso-probability lines for Gaussian Processes classification (GPC)</span></a></span><a class="headerlink" href="#id129" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the predicted probability of GPC for an RBF kernel with different choi..."><div class="figure align-default" id="id130">
<img alt="../_images/sphx_glr_plot_gpc_thumb.png" src="../_images/sphx_glr_plot_gpc_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpc.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-py"><span class="std std-ref">Probabilistic predictions with Gaussian process classification (GPC)</span></a></span><a class="headerlink" href="#id130" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates that GPR with a sum-kernel including a WhiteKernel can estimate the no..."><div class="figure align-default" id="id131">
<img alt="../_images/sphx_glr_plot_gpr_noisy_thumb.png" src="../_images/sphx_glr_plot_gpr_noisy_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpr_noisy.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-noisy-py"><span class="std std-ref">Gaussian process regression (GPR) with noise-level estimation</span></a></span><a class="headerlink" href="#id131" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A simple one-dimensional regression example computed in two different ways:"><div class="figure align-default" id="id132">
<img alt="../_images/sphx_glr_plot_gpr_noisy_targets_thumb.png" src="../_images/sphx_glr_plot_gpr_noisy_targets_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpr_noisy_targets.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-noisy-targets-py"><span class="std std-ref">Gaussian Processes regression: basic introductory example</span></a></span><a class="headerlink" href="#id132" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example is based on Section 5.4.3 of &quot;Gaussian Processes for Machine Learning&quot; [RW2006]. I..."><div class="figure align-default" id="id133">
<img alt="../_images/sphx_glr_plot_gpr_co2_thumb.png" src="../_images/sphx_glr_plot_gpr_co2_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpr_co2.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-co2-py"><span class="std std-ref">Gaussian process regression (GPR) on Mauna Loa CO2 data.</span></a></span><a class="headerlink" href="#id133" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of Gaussian processes for regression and classification tasks ..."><div class="figure align-default" id="id134">
<img alt="../_images/sphx_glr_plot_gpr_on_structured_data_thumb.png" src="../_images/sphx_glr_plot_gpr_on_structured_data_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="gaussian_process/plot_gpr_on_structured_data.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-on-structured-data-py"><span class="std std-ref">Gaussian processes on discrete data structures</span></a></span><a class="headerlink" href="#id134" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="generalized-linear-models">
<span id="linear-examples"></span><span id="sphx-glr-auto-examples-linear-model"></span><h2>Generalized Linear Models<a class="headerlink" href="#generalized-linear-models" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.linear_model" title="sklearn.linear_model"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.linear_model</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Computes Lasso Path along the regularization parameter using the LARS algorithm on the diabetes..."><div class="figure align-default" id="id135">
<img alt="../_images/sphx_glr_plot_lasso_lars_thumb.png" src="../_images/sphx_glr_plot_lasso_lars_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_lasso_lars.html#sphx-glr-auto-examples-linear-model-plot-lasso-lars-py"><span class="std std-ref">Lasso path using LARS</span></a></span><a class="headerlink" href="#id135" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Shows the effect of collinearity in the coefficients of an estimator."><div class="figure align-default" id="id136">
<img alt="../_images/sphx_glr_plot_ridge_path_thumb.png" src="../_images/sphx_glr_plot_ridge_path_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ridge_path.html#sphx-glr-auto-examples-linear-model-plot-ridge-path-py"><span class="std std-ref">Plot Ridge coefficients as a function of the regularization</span></a></span><a class="headerlink" href="#id136" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a line..."><div class="figure align-default" id="id137">
<img alt="../_images/sphx_glr_plot_sgd_separating_hyperplane_thumb.png" src="../_images/sphx_glr_plot_sgd_separating_hyperplane_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_separating_hyperplane.html#sphx-glr-auto-examples-linear-model-plot-sgd-separating-hyperplane-py"><span class="std std-ref">SGD: Maximum margin separating hyperplane</span></a></span><a class="headerlink" href="#id137" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A plot that compares the various convex loss functions supported by sklearn.linear_model.SGDCla..."><div class="figure align-default" id="id138">
<img alt="../_images/sphx_glr_plot_sgd_loss_functions_thumb.png" src="../_images/sphx_glr_plot_sgd_loss_functions_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_loss_functions.html#sphx-glr-auto-examples-linear-model-plot-sgd-loss-functions-py"><span class="std std-ref">SGD: convex loss functions</span></a></span><a class="headerlink" href="#id138" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Ridge regression is basically minimizing a penalised version of the least-squared function. The..."><div class="figure align-default" id="id139">
<img alt="../_images/sphx_glr_plot_ols_ridge_variance_thumb.png" src="../_images/sphx_glr_plot_ols_ridge_variance_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ols_ridge_variance.html#sphx-glr-auto-examples-linear-model-plot-ols-ridge-variance-py"><span class="std std-ref">Ordinary Least Squares and Ridge Regression Variance</span></a></span><a class="headerlink" href="#id139" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Ridge Regression is the estimator used in this example. Each color in the left plot represents ..."><div class="figure align-default" id="id140">
<img alt="../_images/sphx_glr_plot_ridge_coeffs_thumb.png" src="../_images/sphx_glr_plot_ridge_coeffs_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ridge_coeffs.html#sphx-glr-auto-examples-linear-model-plot-ridge-coeffs-py"><span class="std std-ref">Plot Ridge coefficients as a function of the L2 regularization</span></a></span><a class="headerlink" href="#id140" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Contours of where the penalty is equal to 1 for the three penalties L1, L2 and elastic-net."><div class="figure align-default" id="id141">
<img alt="../_images/sphx_glr_plot_sgd_penalties_thumb.png" src="../_images/sphx_glr_plot_sgd_penalties_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_penalties.html#sphx-glr-auto-examples-linear-model-plot-sgd-penalties-py"><span class="std std-ref">SGD: Penalties</span></a></span><a class="headerlink" href="#id141" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip=" Train l1-penalized logistic regression models on a binary classification problem derived from ..."><div class="figure align-default" id="id142">
<img alt="../_images/sphx_glr_plot_logistic_path_thumb.png" src="../_images/sphx_glr_plot_logistic_path_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_logistic_path.html#sphx-glr-auto-examples-linear-model-plot-logistic-path-py"><span class="std std-ref">Regularization path of L1- Logistic Regression</span></a></span><a class="headerlink" href="#id142" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to approximate a function with a polynomial of degree n_degree by..."><div class="figure align-default" id="id143">
<img alt="../_images/sphx_glr_plot_polynomial_interpolation_thumb.png" src="../_images/sphx_glr_plot_polynomial_interpolation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_polynomial_interpolation.html#sphx-glr-auto-examples-linear-model-plot-polynomial-interpolation-py"><span class="std std-ref">Polynomial interpolation</span></a></span><a class="headerlink" href="#id143" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Shown in the plot is how the logistic regression would, in this synthetic dataset, classify val..."><div class="figure align-default" id="id144">
<img alt="../_images/sphx_glr_plot_logistic_thumb.png" src="../_images/sphx_glr_plot_logistic_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_logistic.html#sphx-glr-auto-examples-linear-model-plot-logistic-py"><span class="std std-ref">Logistic function</span></a></span><a class="headerlink" href="#id144" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Show below is a logistic-regression classifiers decision boundaries on the first two dimensions..."><div class="figure align-default" id="id145">
<img alt="../_images/sphx_glr_plot_iris_logistic_thumb.png" src="../_images/sphx_glr_plot_iris_logistic_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_iris_logistic.html#sphx-glr-auto-examples-linear-model-plot-iris-logistic-py"><span class="std std-ref">Logistic Regression 3-class Classifier</span></a></span><a class="headerlink" href="#id145" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w..."><div class="figure align-default" id="id146">
<img alt="../_images/sphx_glr_plot_sgd_weighted_samples_thumb.png" src="../_images/sphx_glr_plot_sgd_weighted_samples_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_weighted_samples.html#sphx-glr-auto-examples-linear-model-plot-sgd-weighted-samples-py"><span class="std std-ref">SGD: Weighted samples</span></a></span><a class="headerlink" href="#id146" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The coefficients, the residual sum of squares and the coefficient of determination are also cal..."><div class="figure align-default" id="id147">
<img alt="../_images/sphx_glr_plot_ols_thumb.png" src="../_images/sphx_glr_plot_ols_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py"><span class="std std-ref">Linear Regression Example</span></a></span><a class="headerlink" href="#id147" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example we see how to robustly fit a linear model to faulty data using the RANSAC algor..."><div class="figure align-default" id="id148">
<img alt="../_images/sphx_glr_plot_ransac_thumb.png" src="../_images/sphx_glr_plot_ransac_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ransac.html#sphx-glr-auto-examples-linear-model-plot-ransac-py"><span class="std std-ref">Robust linear model estimation using RANSAC</span></a></span><a class="headerlink" href="#id148" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Features 1 and 2 of the diabetes-dataset are fitted and plotted below. It illustrates that alth..."><div class="figure align-default" id="id149">
<img alt="../_images/sphx_glr_plot_ols_3d_thumb.png" src="../_images/sphx_glr_plot_ols_3d_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ols_3d.html#sphx-glr-auto-examples-linear-model-plot-ols-3d-py"><span class="std std-ref">Sparsity Example: Fitting only features 1  and 2</span></a></span><a class="headerlink" href="#id149" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Fit Ridge and HuberRegressor on a dataset with outliers."><div class="figure align-default" id="id150">
<img alt="../_images/sphx_glr_plot_huber_vs_ridge_thumb.png" src="../_images/sphx_glr_plot_huber_vs_ridge_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_huber_vs_ridge.html#sphx-glr-auto-examples-linear-model-plot-huber-vs-ridge-py"><span class="std std-ref">HuberRegressor vs Ridge on dataset with strong outliers</span></a></span><a class="headerlink" href="#id150" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="We show that linear_model.Lasso provides the same results for dense and sparse data and that in..."><div class="figure align-default" id="id151">
<img alt="../_images/sphx_glr_plot_lasso_dense_vs_sparse_data_thumb.png" src="../_images/sphx_glr_plot_lasso_dense_vs_sparse_data_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_lasso_dense_vs_sparse_data.html#sphx-glr-auto-examples-linear-model-plot-lasso-dense-vs-sparse-data-py"><span class="std std-ref">Lasso on dense and sparse data</span></a></span><a class="headerlink" href="#id151" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example showing how different online solvers perform on the hand-written digits dataset."><div class="figure align-default" id="id152">
<img alt="../_images/sphx_glr_plot_sgd_comparison_thumb.png" src="../_images/sphx_glr_plot_sgd_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_comparison.html#sphx-glr-auto-examples-linear-model-plot-sgd-comparison-py"><span class="std std-ref">Comparing various online solvers</span></a></span><a class="headerlink" href="#id152" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The multi-task lasso allows to fit multiple regression problems jointly enforcing the selected ..."><div class="figure align-default" id="id153">
<img alt="../_images/sphx_glr_plot_multi_task_lasso_support_thumb.png" src="../_images/sphx_glr_plot_multi_task_lasso_support_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_multi_task_lasso_support.html#sphx-glr-auto-examples-linear-model-plot-multi-task-lasso-support-py"><span class="std std-ref">Joint feature selection with multi-task Lasso</span></a></span><a class="headerlink" href="#id153" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we fit a multinomial logistic regression with L1 penalty on a subset of the MNIST digits c..."><div class="figure align-default" id="id154">
<img alt="../_images/sphx_glr_plot_sparse_logistic_regression_mnist_thumb.png" src="../_images/sphx_glr_plot_sparse_logistic_regression_mnist_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sparse_logistic_regression_mnist.html#sphx-glr-auto-examples-linear-model-plot-sparse-logistic-regression-mnist-py"><span class="std std-ref">MNIST classfification using multinomial logistic + L1</span></a></span><a class="headerlink" href="#id154" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot decision surface of multi-class SGD on iris dataset. The hyperplanes corresponding to the ..."><div class="figure align-default" id="id155">
<img alt="../_images/sphx_glr_plot_sgd_iris_thumb.png" src="../_images/sphx_glr_plot_sgd_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_iris.html#sphx-glr-auto-examples-linear-model-plot-sgd-iris-py"><span class="std std-ref">Plot multi-class SGD on the iris dataset</span></a></span><a class="headerlink" href="#id155" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Using orthogonal matching pursuit for recovering a sparse signal from a noisy measurement encod..."><div class="figure align-default" id="id156">
<img alt="../_images/sphx_glr_plot_omp_thumb.png" src="../_images/sphx_glr_plot_omp_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_omp.html#sphx-glr-auto-examples-linear-model-plot-omp-py"><span class="std std-ref">Orthogonal Matching Pursuit</span></a></span><a class="headerlink" href="#id156" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Estimates Lasso and Elastic-Net regression models on a manually generated sparse signal corrupt..."><div class="figure align-default" id="id157">
<img alt="../_images/sphx_glr_plot_lasso_and_elasticnet_thumb.png" src="../_images/sphx_glr_plot_lasso_and_elasticnet_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_lasso_and_elasticnet.html#sphx-glr-auto-examples-linear-model-plot-lasso-and-elasticnet-py"><span class="std std-ref">Lasso and Elastic Net for Sparse Signals</span></a></span><a class="headerlink" href="#id157" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Computes a Bayesian Ridge Regression of Sinusoids."><div class="figure align-default" id="id158">
<img alt="../_images/sphx_glr_plot_bayesian_ridge_curvefit_thumb.png" src="../_images/sphx_glr_plot_bayesian_ridge_curvefit_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_bayesian_ridge_curvefit.html#sphx-glr-auto-examples-linear-model-plot-bayesian-ridge-curvefit-py"><span class="std std-ref">Curve Fitting with Bayesian Ridge Regression</span></a></span><a class="headerlink" href="#id158" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Computes a Theil-Sen Regression on a synthetic dataset."><div class="figure align-default" id="id159">
<img alt="../_images/sphx_glr_plot_theilsen_thumb.png" src="../_images/sphx_glr_plot_theilsen_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_theilsen.html#sphx-glr-auto-examples-linear-model-plot-theilsen-py"><span class="std std-ref">Theil-Sen Regression</span></a></span><a class="headerlink" href="#id159" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot decision surface of multinomial and One-vs-Rest Logistic Regression. The hyperplanes corre..."><div class="figure align-default" id="id160">
<img alt="../_images/sphx_glr_plot_logistic_multinomial_thumb.png" src="../_images/sphx_glr_plot_logistic_multinomial_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_logistic_multinomial.html#sphx-glr-auto-examples-linear-model-plot-logistic-multinomial-py"><span class="std std-ref">Plot multinomial and One-vs-Rest Logistic Regression</span></a></span><a class="headerlink" href="#id160" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here a sine function is fit with a polynomial of order 3, for values close to zero."><div class="figure align-default" id="id161">
<img alt="../_images/sphx_glr_plot_robust_fit_thumb.png" src="../_images/sphx_glr_plot_robust_fit_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_robust_fit.html#sphx-glr-auto-examples-linear-model-plot-robust-fit-py"><span class="std std-ref">Robust linear estimator fitting</span></a></span><a class="headerlink" href="#id161" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Comparison of the sparsity (percentage of zero coefficients) of solutions when L1, L2 and Elast..."><div class="figure align-default" id="id162">
<img alt="../_images/sphx_glr_plot_logistic_l1_l2_sparsity_thumb.png" src="../_images/sphx_glr_plot_logistic_l1_l2_sparsity_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_logistic_l1_l2_sparsity.html#sphx-glr-auto-examples-linear-model-plot-logistic-l1-l2-sparsity-py"><span class="std std-ref">L1 Penalty and Sparsity in Logistic Regression</span></a></span><a class="headerlink" href="#id162" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent."><div class="figure align-default" id="id163">
<img alt="../_images/sphx_glr_plot_lasso_coordinate_descent_path_thumb.png" src="../_images/sphx_glr_plot_lasso_coordinate_descent_path_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_lasso_coordinate_descent_path.html#sphx-glr-auto-examples-linear-model-plot-lasso-coordinate-descent-path-py"><span class="std std-ref">Lasso and Elastic Net</span></a></span><a class="headerlink" href="#id163" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Fit regression model with Bayesian Ridge Regression."><div class="figure align-default" id="id164">
<img alt="../_images/sphx_glr_plot_ard_thumb.png" src="../_images/sphx_glr_plot_ard_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_ard.html#sphx-glr-auto-examples-linear-model-plot-ard-py"><span class="std std-ref">Automatic Relevance Determination Regression (ARD)</span></a></span><a class="headerlink" href="#id164" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Computes a Bayesian Ridge Regression on a synthetic dataset."><div class="figure align-default" id="id165">
<img alt="../_images/sphx_glr_plot_bayesian_ridge_thumb.png" src="../_images/sphx_glr_plot_bayesian_ridge_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_bayesian_ridge.html#sphx-glr-auto-examples-linear-model-plot-bayesian-ridge-py"><span class="std std-ref">Bayesian Ridge Regression</span></a></span><a class="headerlink" href="#id165" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Use the Akaike information criterion (AIC), the Bayes Information criterion (BIC) and cross-val..."><div class="figure align-default" id="id166">
<img alt="../_images/sphx_glr_plot_lasso_model_selection_thumb.png" src="../_images/sphx_glr_plot_lasso_model_selection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_lasso_model_selection.html#sphx-glr-auto-examples-linear-model-plot-lasso-model-selection-py"><span class="std std-ref">Lasso model selection: Cross-Validation / AIC / BIC</span></a></span><a class="headerlink" href="#id166" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Comparison of multinomial logistic L1 vs one-versus-rest L1 logistic regression to classify doc..."><div class="figure align-default" id="id167">
<img alt="../_images/sphx_glr_plot_sparse_logistic_regression_20newsgroups_thumb.png" src="../_images/sphx_glr_plot_sparse_logistic_regression_20newsgroups_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sparse_logistic_regression_20newsgroups.html#sphx-glr-auto-examples-linear-model-plot-sparse-logistic-regression-20newsgroups-py"><span class="std std-ref">Multiclass sparse logisitic regression on newgroups20</span></a></span><a class="headerlink" href="#id167" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Stochastic Gradient Descent is an optimization technique which minimizes a loss function in a s..."><div class="figure align-default" id="id168">
<img alt="../_images/sphx_glr_plot_sgd_early_stopping_thumb.png" src="../_images/sphx_glr_plot_sgd_early_stopping_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="linear_model/plot_sgd_early_stopping.html#sphx-glr-auto-examples-linear-model-plot-sgd-early-stopping-py"><span class="std std-ref">Early stopping of Stochastic Gradient Descent</span></a></span><a class="headerlink" href="#id168" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="inspection">
<span id="inspection-examples"></span><span id="sphx-glr-auto-examples-inspection"></span><h2>Inspection<a class="headerlink" href="#inspection" title="Permalink to this headline">¶</a></h2>
<p>Examples related to the <a class="reference internal" href="../modules/classes.html#module-sklearn.inspection" title="sklearn.inspection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.inspection</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we compute the permutation importance on the Wisconsin breast cancer dataset u..."><div class="figure align-default" id="id169">
<img alt="../_images/sphx_glr_plot_permutation_importance_multicollinear_thumb.png" src="../_images/sphx_glr_plot_permutation_importance_multicollinear_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="inspection/plot_permutation_importance_multicollinear.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-multicollinear-py"><span class="std std-ref">Permutation Importance with Multicollinear or Correlated Features</span></a></span><a class="headerlink" href="#id169" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we will compare the impurity-based feature importance of RandomForestClassifie..."><div class="figure align-default" id="id170">
<img alt="../_images/sphx_glr_plot_permutation_importance_thumb.png" src="../_images/sphx_glr_plot_permutation_importance_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="inspection/plot_permutation_importance.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-py"><span class="std std-ref">Permutation Importance vs Random Forest Feature Importance (MDI)</span></a></span><a class="headerlink" href="#id170" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Partial dependence plots show the dependence between the target function [2]_ and a set of &#x27;tar..."><div class="figure align-default" id="id171">
<img alt="../_images/sphx_glr_plot_partial_dependence_thumb.png" src="../_images/sphx_glr_plot_partial_dependence_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="inspection/plot_partial_dependence.html#sphx-glr-auto-examples-inspection-plot-partial-dependence-py"><span class="std std-ref">Partial Dependence Plots</span></a></span><a class="headerlink" href="#id171" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="manifold-learning">
<span id="manifold-examples"></span><span id="sphx-glr-auto-examples-manifold"></span><h2>Manifold learning<a class="headerlink" href="#manifold-learning" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.manifold" title="sklearn.manifold"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.manifold</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of Swiss Roll reduction with locally linear embedding "><div class="figure align-default" id="id172">
<img alt="../_images/sphx_glr_plot_swissroll_thumb.png" src="../_images/sphx_glr_plot_swissroll_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="manifold/plot_swissroll.html#sphx-glr-auto-examples-manifold-plot-swissroll-py"><span class="std std-ref">Swiss Roll reduction with LLE</span></a></span><a class="headerlink" href="#id172" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of the metric and non-metric MDS on generated noisy data."><div class="figure align-default" id="id173">
<img alt="../_images/sphx_glr_plot_mds_thumb.png" src="../_images/sphx_glr_plot_mds_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="manifold/plot_mds.html#sphx-glr-auto-examples-manifold-plot-mds-py"><span class="std std-ref">Multi-dimensional scaling</span></a></span><a class="headerlink" href="#id173" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of t-SNE on the two concentric circles and the S-curve datasets for different p..."><div class="figure align-default" id="id174">
<img alt="../_images/sphx_glr_plot_t_sne_perplexity_thumb.png" src="../_images/sphx_glr_plot_t_sne_perplexity_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="manifold/plot_t_sne_perplexity.html#sphx-glr-auto-examples-manifold-plot-t-sne-perplexity-py"><span class="std std-ref">t-SNE: The effect of various perplexity values on the shape</span></a></span><a class="headerlink" href="#id174" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of dimensionality reduction on the S-curve dataset with various manifold learni..."><div class="figure align-default" id="id175">
<img alt="../_images/sphx_glr_plot_compare_methods_thumb.png" src="../_images/sphx_glr_plot_compare_methods_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="manifold/plot_compare_methods.html#sphx-glr-auto-examples-manifold-plot-compare-methods-py"><span class="std std-ref">Comparison of Manifold Learning methods</span></a></span><a class="headerlink" href="#id175" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An application of the different manifold techniques on a spherical data-set. Here one can see t..."><div class="figure align-default" id="id176">
<img alt="../_images/sphx_glr_plot_manifold_sphere_thumb.png" src="../_images/sphx_glr_plot_manifold_sphere_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="manifold/plot_manifold_sphere.html#sphx-glr-auto-examples-manifold-plot-manifold-sphere-py"><span class="std std-ref">Manifold Learning methods on a severed sphere</span></a></span><a class="headerlink" href="#id176" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An illustration of various embeddings on the digits dataset."><div class="figure align-default" id="id177">
<img alt="../_images/sphx_glr_plot_lle_digits_thumb.png" src="../_images/sphx_glr_plot_lle_digits_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="manifold/plot_lle_digits.html#sphx-glr-auto-examples-manifold-plot-lle-digits-py"><span class="std std-ref">Manifold learning on handwritten digits: Locally Linear Embedding, Isomap…</span></a></span><a class="headerlink" href="#id177" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="missing-value-imputation">
<span id="impute-examples"></span><span id="sphx-glr-auto-examples-impute"></span><h2>Missing Value Imputation<a class="headerlink" href="#missing-value-imputation" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.impute" title="sklearn.impute"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.impute</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="The sklearn.impute.IterativeImputer class is very flexible - it can be used with a variety of e..."><div class="figure align-default" id="id178">
<img alt="../_images/sphx_glr_plot_iterative_imputer_variants_comparison_thumb.png" src="../_images/sphx_glr_plot_iterative_imputer_variants_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="impute/plot_iterative_imputer_variants_comparison.html#sphx-glr-auto-examples-impute-plot-iterative-imputer-variants-comparison-py"><span class="std std-ref">Imputing missing values with variants of IterativeImputer</span></a></span><a class="headerlink" href="#id178" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Missing values can be replaced by the mean, the median or the most frequent value using the bas..."><div class="figure align-default" id="id179">
<img alt="../_images/sphx_glr_plot_missing_values_thumb.png" src="../_images/sphx_glr_plot_missing_values_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="impute/plot_missing_values.html#sphx-glr-auto-examples-impute-plot-missing-values-py"><span class="std std-ref">Imputing missing values before building an estimator</span></a></span><a class="headerlink" href="#id179" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="model-selection">
<span id="model-selection-examples"></span><span id="sphx-glr-auto-examples-model-selection"></span><h2>Model Selection<a class="headerlink" href="#model-selection" title="Permalink to this headline">¶</a></h2>
<p>Examples related to the <a class="reference internal" href="../modules/classes.html#module-sklearn.model_selection" title="sklearn.model_selection"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.model_selection</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use cross_val_predict to visualize prediction errors."><div class="figure align-default" id="id180">
<img alt="../_images/sphx_glr_plot_cv_predict_thumb.png" src="../_images/sphx_glr_plot_cv_predict_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_cv_predict.html#sphx-glr-auto-examples-model-selection-plot-cv-predict-py"><span class="std std-ref">Plotting Cross-Validated Predictions</span></a></span><a class="headerlink" href="#id180" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Example of confusion matrix usage to evaluate the quality of the output of a classifier on the ..."><div class="figure align-default" id="id181">
<img alt="../_images/sphx_glr_plot_confusion_matrix_thumb.png" src="../_images/sphx_glr_plot_confusion_matrix_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_confusion_matrix.html#sphx-glr-auto-examples-model-selection-plot-confusion-matrix-py"><span class="std std-ref">Confusion matrix</span></a></span><a class="headerlink" href="#id181" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this plot you can see the training scores and validation scores of an SVM for different valu..."><div class="figure align-default" id="id182">
<img alt="../_images/sphx_glr_plot_validation_curve_thumb.png" src="../_images/sphx_glr_plot_validation_curve_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_validation_curve.html#sphx-glr-auto-examples-model-selection-plot-validation-curve-py"><span class="std std-ref">Plotting Validation Curves</span></a></span><a class="headerlink" href="#id182" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the problems of underfitting and overfitting and how we can use linea..."><div class="figure align-default" id="id183">
<img alt="../_images/sphx_glr_plot_underfitting_overfitting_thumb.png" src="../_images/sphx_glr_plot_underfitting_overfitting_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_underfitting_overfitting.html#sphx-glr-auto-examples-model-selection-plot-underfitting-overfitting-py"><span class="std std-ref">Underfitting vs. Overfitting</span></a></span><a class="headerlink" href="#id183" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This examples shows how a classifier is optimized by cross-validation, which is done using the ..."><div class="figure align-default" id="id184">
<img alt="../_images/sphx_glr_plot_grid_search_digits_thumb.png" src="../_images/sphx_glr_plot_grid_search_digits_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_grid_search_digits.html#sphx-glr-auto-examples-model-selection-plot-grid-search-digits-py"><span class="std std-ref">Parameter estimation using grid search with cross-validation</span></a></span><a class="headerlink" href="#id184" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Compare randomized search and grid search for optimizing hyperparameters of a random forest. Al..."><div class="figure align-default" id="id185">
<img alt="../_images/sphx_glr_plot_randomized_search_thumb.png" src="../_images/sphx_glr_plot_randomized_search_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_randomized_search.html#sphx-glr-auto-examples-model-selection-plot-randomized-search-py"><span class="std std-ref">Comparing randomized search and grid search for hyperparameter estimation</span></a></span><a class="headerlink" href="#id185" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Illustration of how the performance of an estimator on unseen data (test data) is not the same ..."><div class="figure align-default" id="id186">
<img alt="../_images/sphx_glr_plot_train_error_vs_test_error_thumb.png" src="../_images/sphx_glr_plot_train_error_vs_test_error_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_train_error_vs_test_error.html#sphx-glr-auto-examples-model-selection-plot-train-error-vs-test-error-py"><span class="std std-ref">Train error vs Test error</span></a></span><a class="headerlink" href="#id186" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Example of Receiver Operating Characteristic (ROC) metric to evaluate classifier output quality..."><div class="figure align-default" id="id187">
<img alt="../_images/sphx_glr_plot_roc_crossval_thumb.png" src="../_images/sphx_glr_plot_roc_crossval_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_roc_crossval.html#sphx-glr-auto-examples-model-selection-plot-roc-crossval-py"><span class="std std-ref">Receiver Operating Characteristic (ROC) with cross validation</span></a></span><a class="headerlink" href="#id187" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example compares non-nested and nested cross-validation strategies on a classifier of the ..."><div class="figure align-default" id="id188">
<img alt="../_images/sphx_glr_plot_nested_cross_validation_iris_thumb.png" src="../_images/sphx_glr_plot_nested_cross_validation_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_nested_cross_validation_iris.html#sphx-glr-auto-examples-model-selection-plot-nested-cross-validation-iris-py"><span class="std std-ref">Nested versus non-nested cross-validation</span></a></span><a class="headerlink" href="#id188" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Multiple metric parameter search can be done by setting the scoring parameter to a list of metr..."><div class="figure align-default" id="id189">
<img alt="../_images/sphx_glr_plot_multi_metric_evaluation_thumb.png" src="../_images/sphx_glr_plot_multi_metric_evaluation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_multi_metric_evaluation.html#sphx-glr-auto-examples-model-selection-plot-multi-metric-evaluation-py"><span class="std std-ref">Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV</span></a></span><a class="headerlink" href="#id189" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The dataset used in this example is the 20 newsgroups dataset which will be automatically downl..."><div class="figure align-default" id="id190">
<img alt="../_images/sphx_glr_grid_search_text_feature_extraction_thumb.png" src="../_images/sphx_glr_grid_search_text_feature_extraction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/grid_search_text_feature_extraction.html#sphx-glr-auto-examples-model-selection-grid-search-text-feature-extraction-py"><span class="std std-ref">Sample pipeline for text feature extraction and evaluation</span></a></span><a class="headerlink" href="#id190" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example balances model complexity and cross-validated score by finding a decent accuracy w..."><div class="figure align-default" id="id191">
<img alt="../_images/sphx_glr_plot_grid_search_refit_callable_thumb.png" src="../_images/sphx_glr_plot_grid_search_refit_callable_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_grid_search_refit_callable.html#sphx-glr-auto-examples-model-selection-plot-grid-search-refit-callable-py"><span class="std std-ref">Balance model complexity and cross-validated score</span></a></span><a class="headerlink" href="#id191" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Choosing the right cross-validation object is a crucial part of fitting a model properly. There..."><div class="figure align-default" id="id192">
<img alt="../_images/sphx_glr_plot_cv_indices_thumb.png" src="../_images/sphx_glr_plot_cv_indices_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_cv_indices.html#sphx-glr-auto-examples-model-selection-plot-cv-indices-py"><span class="std std-ref">Visualizing cross-validation behavior in scikit-learn</span></a></span><a class="headerlink" href="#id192" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Example of Receiver Operating Characteristic (ROC) metric to evaluate classifier output quality..."><div class="figure align-default" id="id193">
<img alt="../_images/sphx_glr_plot_roc_thumb.png" src="../_images/sphx_glr_plot_roc_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_roc.html#sphx-glr-auto-examples-model-selection-plot-roc-py"><span class="std std-ref">Receiver Operating Characteristic (ROC)</span></a></span><a class="headerlink" href="#id193" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Example of Precision-Recall metric to evaluate classifier output quality."><div class="figure align-default" id="id194">
<img alt="../_images/sphx_glr_plot_precision_recall_thumb.png" src="../_images/sphx_glr_plot_precision_recall_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_precision_recall.html#sphx-glr-auto-examples-model-selection-plot-precision-recall-py"><span class="std std-ref">Precision-Recall</span></a></span><a class="headerlink" href="#id194" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plotting Learning Curves"><div class="figure align-default" id="id195">
<img alt="../_images/sphx_glr_plot_learning_curve_thumb.png" src="../_images/sphx_glr_plot_learning_curve_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="model_selection/plot_learning_curve.html#sphx-glr-auto-examples-model-selection-plot-learning-curve-py"><span class="std std-ref">Plotting Learning Curves</span></a></span><a class="headerlink" href="#id195" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="multioutput-methods">
<span id="multioutput-examples"></span><span id="sphx-glr-auto-examples-multioutput"></span><h2>Multioutput methods<a class="headerlink" href="#multioutput-methods" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.multioutput" title="sklearn.multioutput"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.multioutput</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="For this example we will use the `yeast &lt;https://www.openml.org/d/40597&gt;`_ dataset which contai..."><div class="figure align-default" id="id196">
<img alt="../_images/sphx_glr_plot_classifier_chain_yeast_thumb.png" src="../_images/sphx_glr_plot_classifier_chain_yeast_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="multioutput/plot_classifier_chain_yeast.html#sphx-glr-auto-examples-multioutput-plot-classifier-chain-yeast-py"><span class="std std-ref">Classifier Chain</span></a></span><a class="headerlink" href="#id196" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="nearest-neighbors">
<span id="neighbors-examples"></span><span id="sphx-glr-auto-examples-neighbors"></span><h2>Nearest Neighbors<a class="headerlink" href="#nearest-neighbors" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.neighbors" title="sklearn.neighbors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neighbors</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Demonstrate the resolution of a regression problem using a k-Nearest Neighbor and the interpola..."><div class="figure align-default" id="id197">
<img alt="../_images/sphx_glr_plot_regression_thumb.png" src="../_images/sphx_glr_plot_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_regression.html#sphx-glr-auto-examples-neighbors-plot-regression-py"><span class="std std-ref">Nearest Neighbors regression</span></a></span><a class="headerlink" href="#id197" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which comp..."><div class="figure align-default" id="id198">
<img alt="../_images/sphx_glr_plot_lof_outlier_detection_thumb.png" src="../_images/sphx_glr_plot_lof_outlier_detection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_lof_outlier_detection.html#sphx-glr-auto-examples-neighbors-plot-lof-outlier-detection-py"><span class="std std-ref">Outlier detection with Local Outlier Factor (LOF)</span></a></span><a class="headerlink" href="#id198" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Nearest Neighbors classification. It will plot the decision boundaries for each..."><div class="figure align-default" id="id199">
<img alt="../_images/sphx_glr_plot_classification_thumb.png" src="../_images/sphx_glr_plot_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_classification.html#sphx-glr-auto-examples-neighbors-plot-classification-py"><span class="std std-ref">Nearest Neighbors Classification</span></a></span><a class="headerlink" href="#id199" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Nearest Centroid classification. It will plot the decision boundaries for each ..."><div class="figure align-default" id="id200">
<img alt="../_images/sphx_glr_plot_nearest_centroid_thumb.png" src="../_images/sphx_glr_plot_nearest_centroid_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_nearest_centroid.html#sphx-glr-auto-examples-neighbors-plot-nearest-centroid-py"><span class="std std-ref">Nearest Centroid Classification</span></a></span><a class="headerlink" href="#id200" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how kernel density estimation (KDE), a powerful non-parametric density estim..."><div class="figure align-default" id="id201">
<img alt="../_images/sphx_glr_plot_digits_kde_sampling_thumb.png" src="../_images/sphx_glr_plot_digits_kde_sampling_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_digits_kde_sampling.html#sphx-glr-auto-examples-neighbors-plot-digits-kde-sampling-py"><span class="std std-ref">Kernel Density Estimation</span></a></span><a class="headerlink" href="#id201" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This examples demonstrates how to precompute the k nearest neighbors before using them in KNeig..."><div class="figure align-default" id="id202">
<img alt="../_images/sphx_glr_plot_caching_nearest_neighbors_thumb.png" src="../_images/sphx_glr_plot_caching_nearest_neighbors_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_caching_nearest_neighbors.html#sphx-glr-auto-examples-neighbors-plot-caching-nearest-neighbors-py"><span class="std std-ref">Caching nearest neighbors</span></a></span><a class="headerlink" href="#id202" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates a learned distance metric that maximizes the nearest neighbors classif..."><div class="figure align-default" id="id203">
<img alt="../_images/sphx_glr_plot_nca_illustration_thumb.png" src="../_images/sphx_glr_plot_nca_illustration_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_nca_illustration.html#sphx-glr-auto-examples-neighbors-plot-nca-illustration-py"><span class="std std-ref">Neighborhood Components Analysis Illustration</span></a></span><a class="headerlink" href="#id203" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The Local Outlier Factor (LOF) algorithm is an unsupervised anomaly detection method which comp..."><div class="figure align-default" id="id204">
<img alt="../_images/sphx_glr_plot_lof_novelty_detection_thumb.png" src="../_images/sphx_glr_plot_lof_novelty_detection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_lof_novelty_detection.html#sphx-glr-auto-examples-neighbors-plot-lof-novelty-detection-py"><span class="std std-ref">Novelty detection with Local Outlier Factor (LOF)</span></a></span><a class="headerlink" href="#id204" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example comparing nearest neighbors classification with and without Neighborhood Components ..."><div class="figure align-default" id="id205">
<img alt="../_images/sphx_glr_plot_nca_classification_thumb.png" src="../_images/sphx_glr_plot_nca_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_nca_classification.html#sphx-glr-auto-examples-neighbors-plot-nca-classification-py"><span class="std std-ref">Comparing Nearest Neighbors with and without Neighborhood Components Analysis</span></a></span><a class="headerlink" href="#id205" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Sample usage of Neighborhood Components Analysis for dimensionality reduction."><div class="figure align-default" id="id206">
<img alt="../_images/sphx_glr_plot_nca_dim_reduction_thumb.png" src="../_images/sphx_glr_plot_nca_dim_reduction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_nca_dim_reduction.html#sphx-glr-auto-examples-neighbors-plot-nca-dim-reduction-py"><span class="std std-ref">Dimensionality Reduction with Neighborhood Components Analysis</span></a></span><a class="headerlink" href="#id206" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example does not perform any learning over the data (see sphx_glr_auto_examples_applicatio..."><div class="figure align-default" id="id207">
<img alt="../_images/sphx_glr_plot_species_kde_thumb.png" src="../_images/sphx_glr_plot_species_kde_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_species_kde.html#sphx-glr-auto-examples-neighbors-plot-species-kde-py"><span class="std std-ref">Kernel Density Estimate of Species Distributions</span></a></span><a class="headerlink" href="#id207" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The first plot shows one of the problems with using histograms to visualize the density of poin..."><div class="figure align-default" id="id208">
<img alt="../_images/sphx_glr_plot_kde_1d_thumb.png" src="../_images/sphx_glr_plot_kde_1d_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/plot_kde_1d.html#sphx-glr-auto-examples-neighbors-plot-kde-1d-py"><span class="std std-ref">Simple 1D Kernel Density Estimation</span></a></span><a class="headerlink" href="#id208" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example presents how to chain KNeighborsTransformer and TSNE in a pipeline. It also shows ..."><div class="figure align-default" id="id209">
<img alt="../_images/sphx_glr_approximate_nearest_neighbors_thumb.png" src="../_images/sphx_glr_approximate_nearest_neighbors_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neighbors/approximate_nearest_neighbors.html#sphx-glr-auto-examples-neighbors-approximate-nearest-neighbors-py"><span class="std std-ref">Approximate nearest neighbors in TSNE</span></a></span><a class="headerlink" href="#id209" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="neural-networks">
<span id="neural-network-examples"></span><span id="sphx-glr-auto-examples-neural-networks"></span><h2>Neural Networks<a class="headerlink" href="#neural-networks" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.neural_network" title="sklearn.neural_network"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.neural_network</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Sometimes looking at the learned coefficients of a neural network can provide insight into the ..."><div class="figure align-default" id="id210">
<img alt="../_images/sphx_glr_plot_mnist_filters_thumb.png" src="../_images/sphx_glr_plot_mnist_filters_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neural_networks/plot_mnist_filters.html#sphx-glr-auto-examples-neural-networks-plot-mnist-filters-py"><span class="std std-ref">Visualization of MLP weights on MNIST</span></a></span><a class="headerlink" href="#id210" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="For greyscale image data where pixel values can be interpreted as degrees of blackness on a whi..."><div class="figure align-default" id="id211">
<img alt="../_images/sphx_glr_plot_rbm_logistic_classification_thumb.png" src="../_images/sphx_glr_plot_rbm_logistic_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neural_networks/plot_rbm_logistic_classification.html#sphx-glr-auto-examples-neural-networks-plot-rbm-logistic-classification-py"><span class="std std-ref">Restricted Boltzmann Machine features for digit classification</span></a></span><a class="headerlink" href="#id211" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A comparison of different values for regularization parameter &#x27;alpha&#x27; on synthetic datasets. Th..."><div class="figure align-default" id="id212">
<img alt="../_images/sphx_glr_plot_mlp_alpha_thumb.png" src="../_images/sphx_glr_plot_mlp_alpha_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neural_networks/plot_mlp_alpha.html#sphx-glr-auto-examples-neural-networks-plot-mlp-alpha-py"><span class="std std-ref">Varying regularization in Multi-layer Perceptron</span></a></span><a class="headerlink" href="#id212" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example visualizes some training loss curves for different stochastic learning strategies,..."><div class="figure align-default" id="id213">
<img alt="../_images/sphx_glr_plot_mlp_training_curves_thumb.png" src="../_images/sphx_glr_plot_mlp_training_curves_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="neural_networks/plot_mlp_training_curves.html#sphx-glr-auto-examples-neural-networks-plot-mlp-training-curves-py"><span class="std std-ref">Compare Stochastic learning strategies for MLPClassifier</span></a></span><a class="headerlink" href="#id213" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="pipelines-and-composite-estimators">
<span id="compose-examples"></span><span id="sphx-glr-auto-examples-compose"></span><h2>Pipelines and composite estimators<a class="headerlink" href="#pipelines-and-composite-estimators" title="Permalink to this headline">¶</a></h2>
<p>Examples of how to compose transformers and pipelines from other estimators. See the <a class="reference internal" href="../modules/compose.html#combining-estimators"><span class="std std-ref">User Guide</span></a>.</p>
<div class="sphx-glr-thumbcontainer" tooltip="In many real-world examples, there are many ways to extract features from a dataset. Often it i..."><div class="figure align-default" id="id214">
<img alt="../_images/sphx_glr_plot_feature_union_thumb.png" src="../_images/sphx_glr_plot_feature_union_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="compose/plot_feature_union.html#sphx-glr-auto-examples-compose-plot-feature-union-py"><span class="std std-ref">Concatenating multiple feature extraction methods</span></a></span><a class="headerlink" href="#id214" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The PCA does an unsupervised dimensionality reduction, while the logistic regression does the p..."><div class="figure align-default" id="id215">
<img alt="../_images/sphx_glr_plot_digits_pipe_thumb.png" src="../_images/sphx_glr_plot_digits_pipe_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="compose/plot_digits_pipe.html#sphx-glr-auto-examples-compose-plot-digits-pipe-py"><span class="std std-ref">Pipelining: chaining a PCA and a logistic regression</span></a></span><a class="headerlink" href="#id215" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to apply different preprocessing and feature extraction pipelines ..."><div class="figure align-default" id="id216">
<img alt="../_images/sphx_glr_plot_column_transformer_mixed_types_thumb.png" src="../_images/sphx_glr_plot_column_transformer_mixed_types_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="compose/plot_column_transformer_mixed_types.html#sphx-glr-auto-examples-compose-plot-column-transformer-mixed-types-py"><span class="std std-ref">Column Transformer with Mixed Types</span></a></span><a class="headerlink" href="#id216" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example constructs a pipeline that does dimensionality reduction followed by prediction wi..."><div class="figure align-default" id="id217">
<img alt="../_images/sphx_glr_plot_compare_reduction_thumb.png" src="../_images/sphx_glr_plot_compare_reduction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="compose/plot_compare_reduction.html#sphx-glr-auto-examples-compose-plot-compare-reduction-py"><span class="std std-ref">Selecting dimensionality reduction with Pipeline and GridSearchCV</span></a></span><a class="headerlink" href="#id217" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Datasets can often contain components of that require different feature extraction and processi..."><div class="figure align-default" id="id218">
<img alt="../_images/sphx_glr_plot_column_transformer_thumb.png" src="../_images/sphx_glr_plot_column_transformer_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="compose/plot_column_transformer.html#sphx-glr-auto-examples-compose-plot-column-transformer-py"><span class="std std-ref">Column Transformer with Heterogeneous Data Sources</span></a></span><a class="headerlink" href="#id218" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we give an overview of the sklearn.compose.TransformedTargetRegressor. Two exa..."><div class="figure align-default" id="id219">
<img alt="../_images/sphx_glr_plot_transformed_target_thumb.png" src="../_images/sphx_glr_plot_transformed_target_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="compose/plot_transformed_target.html#sphx-glr-auto-examples-compose-plot-transformed-target-py"><span class="std std-ref">Effect of transforming the targets in regression model</span></a></span><a class="headerlink" href="#id219" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="preprocessing">
<span id="preprocessing-examples"></span><span id="sphx-glr-auto-examples-preprocessing"></span><h2>Preprocessing<a class="headerlink" href="#preprocessing" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.preprocessing" title="sklearn.preprocessing"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.preprocessing</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Shows how to use a function transformer in a pipeline. If you know your dataset&#x27;s first princip..."><div class="figure align-default" id="id220">
<img alt="../_images/sphx_glr_plot_function_transformer_thumb.png" src="../_images/sphx_glr_plot_function_transformer_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_function_transformer.html#sphx-glr-auto-examples-preprocessing-plot-function-transformer-py"><span class="std std-ref">Using FunctionTransformer to select columns</span></a></span><a class="headerlink" href="#id220" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The example compares prediction result of linear regression (linear model) and decision tree (t..."><div class="figure align-default" id="id221">
<img alt="../_images/sphx_glr_plot_discretization_thumb.png" src="../_images/sphx_glr_plot_discretization_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_discretization.html#sphx-glr-auto-examples-preprocessing-plot-discretization-py"><span class="std std-ref">Using KBinsDiscretizer to discretize continuous features</span></a></span><a class="headerlink" href="#id221" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example presents the different strategies implemented in KBinsDiscretizer:"><div class="figure align-default" id="id222">
<img alt="../_images/sphx_glr_plot_discretization_strategies_thumb.png" src="../_images/sphx_glr_plot_discretization_strategies_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_discretization_strategies.html#sphx-glr-auto-examples-preprocessing-plot-discretization-strategies-py"><span class="std std-ref">Demonstrating the different strategies of KBinsDiscretizer</span></a></span><a class="headerlink" href="#id222" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Feature scaling through standardization (or Z-score normalization) can be an important preproce..."><div class="figure align-default" id="id223">
<img alt="../_images/sphx_glr_plot_scaling_importance_thumb.png" src="../_images/sphx_glr_plot_scaling_importance_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_scaling_importance.html#sphx-glr-auto-examples-preprocessing-plot-scaling-importance-py"><span class="std std-ref">Importance of Feature Scaling</span></a></span><a class="headerlink" href="#id223" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the use of the Box-Cox and Yeo-Johnson transforms through PowerTransf..."><div class="figure align-default" id="id224">
<img alt="../_images/sphx_glr_plot_map_data_to_normal_thumb.png" src="../_images/sphx_glr_plot_map_data_to_normal_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_map_data_to_normal.html#sphx-glr-auto-examples-preprocessing-plot-map-data-to-normal-py"><span class="std std-ref">Map data to a normal distribution</span></a></span><a class="headerlink" href="#id224" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A demonstration of feature discretization on synthetic classification datasets. Feature discret..."><div class="figure align-default" id="id225">
<img alt="../_images/sphx_glr_plot_discretization_classification_thumb.png" src="../_images/sphx_glr_plot_discretization_classification_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_discretization_classification.html#sphx-glr-auto-examples-preprocessing-plot-discretization-classification-py"><span class="std std-ref">Feature discretization</span></a></span><a class="headerlink" href="#id225" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Feature 0 (median income in a block) and feature 5 (number of households) of the `California ho..."><div class="figure align-default" id="id226">
<img alt="../_images/sphx_glr_plot_all_scaling_thumb.png" src="../_images/sphx_glr_plot_all_scaling_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="preprocessing/plot_all_scaling.html#sphx-glr-auto-examples-preprocessing-plot-all-scaling-py"><span class="std std-ref">Compare the effect of different scalers on data with outliers</span></a></span><a class="headerlink" href="#id226" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="release-highlights">
<span id="release-highlights-examples"></span><span id="sphx-glr-auto-examples-release-highlights"></span><h2>Release Highlights<a class="headerlink" href="#release-highlights" title="Permalink to this headline">¶</a></h2>
<p>These examples illustrate the main features of the releases of scikit-learn.</p>
<div class="sphx-glr-thumbcontainer" tooltip="We are pleased to announce the release of scikit-learn 0.22, which comes with many bug fixes an..."><div class="figure align-default" id="id227">
<img alt="../_images/sphx_glr_plot_release_highlights_0_22_0_thumb.png" src="../_images/sphx_glr_plot_release_highlights_0_22_0_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="release_highlights/plot_release_highlights_0_22_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-0-22-0-py"><span class="std std-ref">Release Highlights for scikit-learn 0.22</span></a></span><a class="headerlink" href="#id227" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="semi-supervised-classification">
<span id="semi-supervised-examples"></span><span id="sphx-glr-auto-examples-semi-supervised"></span><h2>Semi Supervised Classification<a class="headerlink" href="#semi-supervised-classification" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.semi_supervised" title="sklearn.semi_supervised"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.semi_supervised</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Comparison for decision boundary generated on iris dataset between Label Propagation and SVM."><div class="figure align-default" id="id228">
<img alt="../_images/sphx_glr_plot_label_propagation_versus_svm_iris_thumb.png" src="../_images/sphx_glr_plot_label_propagation_versus_svm_iris_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="semi_supervised/plot_label_propagation_versus_svm_iris.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-versus-svm-iris-py"><span class="std std-ref">Decision boundary of label propagation versus SVM on the Iris dataset</span></a></span><a class="headerlink" href="#id228" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Example of LabelPropagation learning a complex internal structure to demonstrate &quot;manifold lear..."><div class="figure align-default" id="id229">
<img alt="../_images/sphx_glr_plot_label_propagation_structure_thumb.png" src="../_images/sphx_glr_plot_label_propagation_structure_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="semi_supervised/plot_label_propagation_structure.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-structure-py"><span class="std std-ref">Label Propagation learning a complex structure</span></a></span><a class="headerlink" href="#id229" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the power of semisupervised learning by training a Label Spreading mo..."><div class="figure align-default" id="id230">
<img alt="../_images/sphx_glr_plot_label_propagation_digits_thumb.png" src="../_images/sphx_glr_plot_label_propagation_digits_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="semi_supervised/plot_label_propagation_digits.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-digits-py"><span class="std std-ref">Label Propagation digits: Demonstrating performance</span></a></span><a class="headerlink" href="#id230" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Demonstrates an active learning technique to learn handwritten digits using label propagation."><div class="figure align-default" id="id231">
<img alt="../_images/sphx_glr_plot_label_propagation_digits_active_learning_thumb.png" src="../_images/sphx_glr_plot_label_propagation_digits_active_learning_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="semi_supervised/plot_label_propagation_digits_active_learning.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-digits-active-learning-py"><span class="std std-ref">Label Propagation digits active learning</span></a></span><a class="headerlink" href="#id231" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="support-vector-machines">
<span id="svm-examples"></span><span id="sphx-glr-auto-examples-svm"></span><h2>Support Vector Machines<a class="headerlink" href="#support-vector-machines" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.svm" title="sklearn.svm"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.svm</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a ..."><div class="figure align-default" id="id232">
<img alt="../_images/sphx_glr_plot_svm_nonlinear_thumb.png" src="../_images/sphx_glr_plot_svm_nonlinear_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_nonlinear.html#sphx-glr-auto-examples-svm-plot-svm-nonlinear-py"><span class="std std-ref">Non-linear SVM</span></a></span><a class="headerlink" href="#id232" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a Supp..."><div class="figure align-default" id="id233">
<img alt="../_images/sphx_glr_plot_separating_hyperplane_thumb.png" src="../_images/sphx_glr_plot_separating_hyperplane_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_separating_hyperplane.html#sphx-glr-auto-examples-svm-plot-separating-hyperplane-py"><span class="std std-ref">SVM: Maximum margin separating hyperplane</span></a></span><a class="headerlink" href="#id233" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface..."><div class="figure align-default" id="id234">
<img alt="../_images/sphx_glr_plot_custom_kernel_thumb.png" src="../_images/sphx_glr_plot_custom_kernel_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_custom_kernel.html#sphx-glr-auto-examples-svm-plot-custom-kernel-py"><span class="std std-ref">SVM with custom kernel</span></a></span><a class="headerlink" href="#id234" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Unlike SVC (based on LIBSVM), LinearSVC (based on LIBLINEAR) does not provide the support vecto..."><div class="figure align-default" id="id235">
<img alt="../_images/sphx_glr_plot_linearsvc_support_vectors_thumb.png" src="../_images/sphx_glr_plot_linearsvc_support_vectors_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_linearsvc_support_vectors.html#sphx-glr-auto-examples-svm-plot-linearsvc-support-vectors-py"><span class="std std-ref">Plot the support vectors in LinearSVC</span></a></span><a class="headerlink" href="#id235" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The two plots differ only in the area in the middle where the classes are tied. If break_ties=F..."><div class="figure align-default" id="id236">
<img alt="../_images/sphx_glr_plot_svm_tie_breaking_thumb.png" src="../_images/sphx_glr_plot_svm_tie_breaking_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_tie_breaking.html#sphx-glr-auto-examples-svm-plot-svm-tie-breaking-py"><span class="std std-ref">SVM Tie Breaking Example</span></a></span><a class="headerlink" href="#id236" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w..."><div class="figure align-default" id="id237">
<img alt="../_images/sphx_glr_plot_weighted_samples_thumb.png" src="../_images/sphx_glr_plot_weighted_samples_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_weighted_samples.html#sphx-glr-auto-examples-svm-plot-weighted-samples-py"><span class="std std-ref">SVM: Weighted samples</span></a></span><a class="headerlink" href="#id237" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Find the optimal separating hyperplane using an SVC for classes that are unbalanced."><div class="figure align-default" id="id238">
<img alt="../_images/sphx_glr_plot_separating_hyperplane_unbalanced_thumb.png" src="../_images/sphx_glr_plot_separating_hyperplane_unbalanced_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_separating_hyperplane_unbalanced.html#sphx-glr-auto-examples-svm-plot-separating-hyperplane-unbalanced-py"><span class="std std-ref">SVM: Separating hyperplane for unbalanced classes</span></a></span><a class="headerlink" href="#id238" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Three different types of SVM-Kernels are displayed below. The polynomial and RBF are especially..."><div class="figure align-default" id="id239">
<img alt="../_images/sphx_glr_plot_svm_kernels_thumb.png" src="../_images/sphx_glr_plot_svm_kernels_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_kernels.html#sphx-glr-auto-examples-svm-plot-svm-kernels-py"><span class="std std-ref">SVM-Kernels</span></a></span><a class="headerlink" href="#id239" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to perform univariate feature selection before running a SVC (support ve..."><div class="figure align-default" id="id240">
<img alt="../_images/sphx_glr_plot_svm_anova_thumb.png" src="../_images/sphx_glr_plot_svm_anova_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_anova.html#sphx-glr-auto-examples-svm-plot-svm-anova-py"><span class="std std-ref">SVM-Anova: SVM with univariate feature selection</span></a></span><a class="headerlink" href="#id240" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Toy example of 1D regression using linear, polynomial and RBF kernels."><div class="figure align-default" id="id241">
<img alt="../_images/sphx_glr_plot_svm_regression_thumb.png" src="../_images/sphx_glr_plot_svm_regression_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_regression.html#sphx-glr-auto-examples-svm-plot-svm-regression-py"><span class="std std-ref">Support Vector Regression (SVR) using linear and non-linear kernels</span></a></span><a class="headerlink" href="#id241" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A small value of C includes more/all the observations, allowing the margins to be calculated us..."><div class="figure align-default" id="id242">
<img alt="../_images/sphx_glr_plot_svm_margin_thumb.png" src="../_images/sphx_glr_plot_svm_margin_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_margin.html#sphx-glr-auto-examples-svm-plot-svm-margin-py"><span class="std std-ref">SVM Margins Example</span></a></span><a class="headerlink" href="#id242" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="An example using a one-class SVM for novelty detection."><div class="figure align-default" id="id243">
<img alt="../_images/sphx_glr_plot_oneclass_thumb.png" src="../_images/sphx_glr_plot_oneclass_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_oneclass.html#sphx-glr-auto-examples-svm-plot-oneclass-py"><span class="std std-ref">One-class SVM with non-linear kernel (RBF)</span></a></span><a class="headerlink" href="#id243" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Comparison of different linear SVM classifiers on a 2D projection of the iris dataset. We only ..."><div class="figure align-default" id="id244">
<img alt="../_images/sphx_glr_plot_iris_svc_thumb.png" src="../_images/sphx_glr_plot_iris_svc_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_iris_svc.html#sphx-glr-auto-examples-svm-plot-iris-svc-py"><span class="std std-ref">Plot different SVM classifiers in the iris dataset</span></a></span><a class="headerlink" href="#id244" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The following example illustrates the effect of scaling the regularization parameter when using..."><div class="figure align-default" id="id245">
<img alt="../_images/sphx_glr_plot_svm_scale_c_thumb.png" src="../_images/sphx_glr_plot_svm_scale_c_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_svm_scale_c.html#sphx-glr-auto-examples-svm-plot-svm-scale-c-py"><span class="std std-ref">Scaling the regularization parameter for SVCs</span></a></span><a class="headerlink" href="#id245" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of the parameters gamma and C of the Radial Basis Function ..."><div class="figure align-default" id="id246">
<img alt="../_images/sphx_glr_plot_rbf_parameters_thumb.png" src="../_images/sphx_glr_plot_rbf_parameters_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="svm/plot_rbf_parameters.html#sphx-glr-auto-examples-svm-plot-rbf-parameters-py"><span class="std std-ref">RBF SVM parameters</span></a></span><a class="headerlink" href="#id246" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="tutorial-exercises">
<span id="sphx-glr-auto-examples-exercises"></span><h2>Tutorial exercises<a class="headerlink" href="#tutorial-exercises" title="Permalink to this headline">¶</a></h2>
<p>Exercises for the tutorials</p>
<div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise regarding the use of classification techniques on the Digits dataset."><div class="figure align-default" id="id247">
<img alt="../_images/sphx_glr_plot_digits_classification_exercise_thumb.png" src="../_images/sphx_glr_plot_digits_classification_exercise_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="exercises/plot_digits_classification_exercise.html#sphx-glr-auto-examples-exercises-plot-digits-classification-exercise-py"><span class="std std-ref">Digits Classification Exercise</span></a></span><a class="headerlink" href="#id247" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise using Cross-validation with an SVM on the Digits dataset."><div class="figure align-default" id="id248">
<img alt="../_images/sphx_glr_plot_cv_digits_thumb.png" src="../_images/sphx_glr_plot_cv_digits_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="exercises/plot_cv_digits.html#sphx-glr-auto-examples-exercises-plot-cv-digits-py"><span class="std std-ref">Cross-validation on Digits Dataset Exercise</span></a></span><a class="headerlink" href="#id248" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise for using different SVM kernels."><div class="figure align-default" id="id249">
<img alt="../_images/sphx_glr_plot_iris_exercise_thumb.png" src="../_images/sphx_glr_plot_iris_exercise_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="exercises/plot_iris_exercise.html#sphx-glr-auto-examples-exercises-plot-iris-exercise-py"><span class="std std-ref">SVM Exercise</span></a></span><a class="headerlink" href="#id249" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A tutorial exercise which uses cross-validation with linear models."><div class="figure align-default" id="id250">
<img alt="../_images/sphx_glr_plot_cv_diabetes_thumb.png" src="../_images/sphx_glr_plot_cv_diabetes_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="exercises/plot_cv_diabetes.html#sphx-glr-auto-examples-exercises-plot-cv-diabetes-py"><span class="std std-ref">Cross-validation on diabetes Dataset Exercise</span></a></span><a class="headerlink" href="#id250" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="working-with-text-documents">
<span id="text-examples"></span><span id="sphx-glr-auto-examples-text"></span><h2>Working with text documents<a class="headerlink" href="#working-with-text-documents" title="Permalink to this headline">¶</a></h2>
<p>Examples concerning the <a class="reference internal" href="../modules/classes.html#module-sklearn.feature_extraction.text" title="sklearn.feature_extraction.text"><code class="xref py py-mod docutils literal notranslate"><span class="pre">sklearn.feature_extraction.text</span></code></a> module.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Compares FeatureHasher and DictVectorizer by using both to vectorize text documents."><div class="figure align-default" id="id251">
<img alt="../_images/sphx_glr_plot_hashing_vs_dict_vectorizer_thumb.png" src="../_images/sphx_glr_plot_hashing_vs_dict_vectorizer_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="text/plot_hashing_vs_dict_vectorizer.html#sphx-glr-auto-examples-text-plot-hashing-vs-dict-vectorizer-py"><span class="std std-ref">FeatureHasher and DictVectorizer Comparison</span></a></span><a class="headerlink" href="#id251" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how the scikit-learn can be used to cluster documents by topics usin..."><div class="figure align-default" id="id252">
<img alt="../_images/sphx_glr_plot_document_clustering_thumb.png" src="../_images/sphx_glr_plot_document_clustering_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="text/plot_document_clustering.html#sphx-glr-auto-examples-text-plot-document-clustering-py"><span class="std std-ref">Clustering text documents using k-means</span></a></span><a class="headerlink" href="#id252" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This is an example showing how scikit-learn can be used to classify documents by topics using a..."><div class="figure align-default" id="id253">
<img alt="../_images/sphx_glr_plot_document_classification_20newsgroups_thumb.png" src="../_images/sphx_glr_plot_document_classification_20newsgroups_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="text/plot_document_classification_20newsgroups.html#sphx-glr-auto-examples-text-plot-document-classification-20newsgroups-py"><span class="std std-ref">Classification of text documents using sparse features</span></a></span><a class="headerlink" href="#id253" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div><div class="sphx-glr-footer class sphx-glr-footer-gallery docutils container">
<div class="sphx-glr-download docutils container">
<p><a class="reference download internal" download="" href="../_downloads/16d005fdb82a9e8040079c2f7edbdd70/auto_examples_python.zip"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">all</span> <span class="pre">examples</span> <span class="pre">in</span> <span class="pre">Python</span> <span class="pre">source</span> <span class="pre">code:</span> <span class="pre">auto_examples_python.zip</span></code></a></p>
</div>
<div class="sphx-glr-download docutils container">
<p><a class="reference download internal" download="" href="../_downloads/4f0ce24596085396f26082b8071819ea/auto_examples_jupyter.zip"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">all</span> <span class="pre">examples</span> <span class="pre">in</span> <span class="pre">Jupyter</span> <span class="pre">notebooks:</span> <span class="pre">auto_examples_jupyter.zip</span></code></a></p>
</div>
</div>
<p class="sphx-glr-signature"><a class="reference external" href="https://sphinx-gallery.github.io">Gallery generated by Sphinx-Gallery</a></p>
</div>
</div>


      </div>
    <div class="container">
      <footer class="sk-content-footer">
            &copy; 2007 - 2019, scikit-learn developers (BSD License).
          <a href="../_sources/auto_examples/index.rst.txt" rel="nofollow">Show this page source</a>
      </footer>
    </div>
  </div>
</div>
<script src="../_static/js/vendor/bootstrap.min.js"></script>

<script>
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    ga('create', 'UA-22606712-2', 'auto');
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>


<script>
$(document).ready(function() {
    /* Add a [>>>] button on the top-right corner of code samples to hide
     * the >>> and ... prompts and the output and thus make the code
     * copyable. */
    var div = $('.highlight-python .highlight,' +
                '.highlight-python3 .highlight,' +
                '.highlight-pycon .highlight,' +
		'.highlight-default .highlight')
    var pre = div.find('pre');

    // get the styles from the current theme
    pre.parent().parent().css('position', 'relative');
    var hide_text = 'Hide prompts and outputs';
    var show_text = 'Show prompts and outputs';

    // create and add the button to all the code blocks that contain >>>
    div.each(function(index) {
        var jthis = $(this);
        if (jthis.find('.gp').length > 0) {
            var button = $('<span class="copybutton">&gt;&gt;&gt;</span>');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
            jthis.prepend(button);
        }
        // tracebacks (.gt) contain bare text elements that need to be
        // wrapped in a span to work with .nextUntil() (see later)
        jthis.find('pre:has(.gt)').contents().filter(function() {
            return ((this.nodeType == 3) && (this.data.trim().length > 0));
        }).wrap('<span>');
    });

    // define the behavior of the button when it's clicked
    $('.copybutton').click(function(e){
        e.preventDefault();
        var button = $(this);
        if (button.data('hidden') === 'false') {
            // hide the code output
            button.parent().find('.go, .gp, .gt').hide();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');
            button.css('text-decoration', 'line-through');
            button.attr('title', show_text);
            button.data('hidden', 'true');
        } else {
            // show the code output
            button.parent().find('.go, .gp, .gt').show();
            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');
            button.css('text-decoration', 'none');
            button.attr('title', hide_text);
            button.data('hidden', 'false');
        }
    });

	/*** Add permalink buttons next to glossary terms ***/
	$('dl.glossary > dt[id]').append(function() {
		return ('<a class="headerlink" href="#' +
			    this.getAttribute('id') +
			    '" title="Permalink to this term">¶</a>');
	});
  /*** Hide navbar when scrolling down ***/
  // Returns true when headerlink target matches hash in url
  (function() {
    hashTargetOnTop = function() {
        var hash = window.location.hash;
        if ( hash.length < 2 ) { return false; }

        var target = document.getElementById( hash.slice(1) );
        if ( target === null ) { return false; }

        var top = target.getBoundingClientRect().top;
        return (top < 2) && (top > -2);
    };

    // Hide navbar on load if hash target is on top
    var navBar = document.getElementById("navbar");
    var navBarToggler = document.getElementById("sk-navbar-toggler");
    var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px";
    var $window = $(window);

    hideNavBar = function() {
        navBar.style.top = navBarHeightHidden;
    };

    showNavBar = function() {
        navBar.style.top = "0";
    }

    if (hashTargetOnTop()) {
        hideNavBar()
    }

    var prevScrollpos = window.pageYOffset;
    hideOnScroll = function(lastScrollTop) {
        if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) {
            return;
        }
        if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){
            hideNavBar()
        } else {
            showNavBar()
        }
        prevScrollpos = lastScrollTop;
    };

    /*** high preformance scroll event listener***/
    var raf = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        window.oRequestAnimationFrame;
    var lastScrollTop = $window.scrollTop();

    if (raf) {
        loop();
    }

    function loop() {
        var scrollTop = $window.scrollTop();
        if (lastScrollTop === scrollTop) {
            raf(loop);
            return;
        } else {
            lastScrollTop = scrollTop;
            hideOnScroll(lastScrollTop);
            raf(loop);
        }
    }
  })();
});

</script>
    
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
    
</body>
</html>